Why C is vastly superior to C++

J

Juha Nieminen

jacob navia said:
Memory footprint. C++ uses up a LOT of memory.

Btw, even if that were true, why would it make C "vastly superior" to C++?
You can just take one single technical property and declare the language
to be considerably superior overall to another language just because of that
one single property, completely disregarding everything else.
 
J

Juha Nieminen

jacob navia said:
Memory footprint. C++ uses up a LOT of memory.

Btw, even if that were true, why would it make C "vastly superior" to C++?
You can't just take one single technical property and declare the language
to be considerably superior overall to another language just because of that
one single property, completely disregarding everything else.
 
J

jacob navia

Le 07/07/11 18:39, Juha Nieminen a écrit :
Btw, even if that were true, why would it make C "vastly superior" to C++?
You can't just take one single technical property and declare the language
to be considerably superior overall to another language just because of that
one single property, completely disregarding everything else.

In the last years I have gotten increasingly bored with data processing.
Stuffing all my memory with computer trivia may seem interesting at the
start, but then... what a bore is it.

To remember all the hacks, the exceptions, the gotchas, the particular
situations where this and that feature doesn't work as expected or
doesn't work at all is increasingly a burden.

C has less rules to remember, less unforeseen interactions between
feature "a" and feature "b". This is a blessing of sorts, you have
less things to remember and you can program more or less the same
stuff.

Yes, maybe templates allow you to program more concisely but the
impact of the whole in your brain memory space is not worth the
effort.

Writing into computer memory is a thing of nanoseconds. Writing
into brain memory (learning and memorizing by heart) is a slow
and painfull process that takes years. In that sense C is better:
you have less stuff to remember, its memory footprint in your
brain is orders of magnitude smaller.

Besides, since your attention is finite, you should really
spend more time trying to understand the application that has its own
domain of "surprises" instead of trying to master the computer
language that anyway is too big to comprehend and now not even its
creator can modify.

Just my two cents
 
M

MikeP

jacob said:
Le 07/07/11 18:39, Juha Nieminen a écrit :

In the last years I have gotten increasingly bored with data
processing. Stuffing all my memory with computer trivia may seem
interesting at the start, but then... what a bore is it.

To remember all the hacks, the exceptions, the gotchas, the particular
situations where this and that feature doesn't work as expected or
doesn't work at all is increasingly a burden.

C has less rules to remember, less unforeseen interactions between
feature "a" and feature "b". This is a blessing of sorts, you have
less things to remember and you can program more or less the same
stuff.

Yes, maybe templates allow you to program more concisely but the
impact of the whole in your brain memory space is not worth the
effort.

Writing into computer memory is a thing of nanoseconds. Writing
into brain memory (learning and memorizing by heart) is a slow
and painfull process that takes years. In that sense C is better:
you have less stuff to remember, its memory footprint in your
brain is orders of magnitude smaller.

Besides, since your attention is finite, you should really
spend more time trying to understand the application that has its own
domain of "surprises" instead of trying to master the computer
language that anyway is too big to comprehend and now not even its
creator can modify.

Just my two cents

Have you tried C# or java? Why be a programmer in a language that
emphasizes the minutia if that does not fit your personality/deisres? Use
a higher-level language (one with GC and an easier type system, e.g.).

Who are you trying to convince of what and why?
 
J

jacob navia

Le 07/07/11 23:48, MikeP a écrit :
Have you tried C# or java?

Yes, great languages for doing business apps, GUI intefaces and
similar stuff.
Why be a programmer in a language that
emphasizes the minutia if that does not fit your personality/deisres?

Maybe because I do not think that "minutia" is unimportant. I have
developed a compiler system that is very small, produces fairly
good assembler code and it is widely used.
Use
a higher-level language (one with GC and an easier type system, e.g.).

The C implementation I distribute uses a GC.
Who are you trying to convince of what and why?

I am just discussing the situation of C++ now, and this continuos
evolution into more and more features as if people would be able
to keep all those specs in mind when they program.
 
M

MikeP

jacob said:
Le 07/07/11 23:48, MikeP a écrit :

Yes, great languages for doing business apps, GUI intefaces and
similar stuff.


Maybe because I do not think that "minutia" is unimportant. I have
developed a compiler system that is very small, produces fairly
good assembler code and it is widely used.


The C implementation I distribute uses a GC.


I am just discussing the situation of C++ now, and this continuos
evolution into more and more features as if people would be able
to keep all those specs in mind when they program.

"OK", Mr. "just discussing". While the compiler for it is very complex,
the language in usage is MUCH less so by comparison, IF you know how to
use the language. Some of the new features are simplifying its use, but
probably are making the compiler more complex still. People run into
trouble when they don't learn the idioms and when they use too many of
the features instead of using them judiciously. It's not a good
self-learn language, but it is still better than anything else out there
for a large class of applications. Use C++ when you can, use C if you
have to, for anything C can do, C++ can do better (ignoring higher-level
languages, like C++/CLI and C#, for the moment).
 
J

Juha Nieminen

jacob navia said:
To remember all the hacks, the exceptions, the gotchas, the particular
situations where this and that feature doesn't work as expected or
doesn't work at all is increasingly a burden.

C has less rules to remember, less unforeseen interactions between
feature "a" and feature "b". This is a blessing of sorts, you have
less things to remember and you can program more or less the same
stuff.

Those two paragraphs contradict each other.

I still find it a bit amusing how C advocates equate the length of the
language definition with the simplicity of the language. The language
definition does not necessarily correlate with the simplicity of the
language, and C is a prime example of this.

In the case of C the brevity of the language specification actually
becomes a burden rather than a useful thing. The only thing it does is
to transfer most of the knowledge, tricks and coding conventions you need
to know and use to the meta level: In other words, as a C programmer you
need to develop your own customs and conventions in order to write working
and safe programs, as the language itself offers little to no tools for
this. This is more problematic than when the language has direct support,
because then different projects and different programmers will have their
own custom conventions, making it more difficult for third-parties to
understand what's going on and why things are done like they are. Also,
a side-effect of this is that programs also tend to become significantly
larger than they need to be.

I also get the feeling that many (or at least some) C advocates think
that, if you show them a very short C++ program that does quite a lot, by
using the standard library tools, that's just a parlor trick that might
be nice for such a short program, but that in a *real* large project those
tricks are mostly useless, and you'll have to resort to the same kinds of
designs as in C. (While C advocates seldom say this explicitly, I often
get the impression.) Of course this isn't true. The same standard tools
can be used in larger real-life projects in the same way as in the small
demo program, and they are very useful and help making the program shorter,
simpler, easier to understand, and safer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top