473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why do you like C more than other programming languages?

There are many languages around: C++, JAVA, PASCAL, and so on. I
tried to learn C++ and JAVA, but ended up criticizing them. Is it
because C was my first programming language?

I like C because, comparatively, it is small, efficient, and able to
handle large and complex tasks.

I could not understand why people are using and talking about other
programming languages.
Jul 8 '08
151 7892
Richard Bos wrote:
jacob navia <ja***@nospam.comwrote:
>Richard Bos wrote:
>>jacob navia <ja***@nospam.comwrote:

Another BIG application of operator overloading is access to generalized
containers using the [ ] notation

String a; // "String" is a counted character string

a[2] = 'b'; // overloaded operator [ ]
Yes, that's another way in which operator overloading can become
confusing. For example, now *(a+2) is no longer the same as a[2].
*Bang* goes the use of pointers. Bad, baaad idea.
If you overload the addition operator for String + integer
you can return a ppointer to the third character of the
data of the string. Then
*(a+2) = 'b';

is exactly the same as you would have with a pointer...

Now tell me, what does *(a+0) contain?
The first byte of a?
No.
Or the first character in a's string?
Yes.
In the first case, your implementation is
broken; in the second case, it's broken in a different way.
It is not "broken" in any way.
>*Bang* goes your objection. Good, gooood idea.

There's this document called the "ISO/IEC International Standard;
Programming languages - C". It contains some interesting information
about what you can and cannot do with a C implementation. You might like
to read it some day.
Structure '+' integer is not defined in the language.
This invokes UB, then lcc-win can do anything, for
example call a user defined function for this purpose.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Aug 1 '08 #151
jacob navia wrote:
>
.... snipped ...
References: 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ,
13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23
The above line is what shows in your headers. This indicates a
newsreader fault. When the reference count reaches 20, the reader
is supposed to delete #2 (up) and add #20, maintaining the output
count at 20. This way the #1 reference connects to the original
post, and the rest connect to the 19 preceding posts. I suspect my
reader has the same fault, since it is a predecessor of
Thunderbird.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **
Aug 1 '08 #152

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
5
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
37
by: seberino | last post by:
I've been reading the beloved Paul Graham's "Hackers and Painters". He claims he developed a web app at light speed using Lisp and lots of macros. It got me curious if Lisp is inherently faster...
66
by: Mitchell S. Honnert | last post by:
In some recent posts, I've seen people who seem to be waxing nostalgic with respect to the "ease of use" of Visual Basic 6. I can't quite put my finger on it, but they seem to be implying that VB6...
109
by: sonugeetha | last post by:
Hi, Please help me in this regard... All the kernel level programs are written in C... (i.e: Open Source LINUX)... Why are they not using C++... I personally feel that C++ is more easy to code...
14
by: deko | last post by:
For building Windows desktop apps, the clear favorite is C#. But my clients can't afford to buy Microsoft products. So I need to develop software for Linux users and web applications. In the...
39
by: =?Utf-8?B?U25laGFs?= | last post by:
Why do software industries go for C# than VB.Net ? Wats the exact difference... Which can be the best option..
13
by: Rosario | last post by:
do you like the "GetLine_m" function i have written today? How many errors do you see? i have try only the option for to load the all file in a string not the option to load a line "\n" ended so...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.