LWN.net Logo

Why learn C? (O'Reilly Radar)

Why learn C? (O'Reilly Radar)

Posted Jun 29, 2012 18:44 UTC (Fri) by HelloWorld (guest, #56129)
In reply to: Why learn C? (O'Reilly Radar) by HenrikH
Parent article: Why learn C? (O'Reilly Radar)

> I am not denying reality one bit, I actually only made a reflection upon the real reality, i.e I constantly compare my work, the time it takes me to write certain things and when I compare that with the people who use those so called modern languages I can see no advantage for them, i,e they do not finish their project faster than me and their software is not more capable than mine.
Even if what you say is true, it's just an anecdote with no representativeness whatsoever.

> Impossible to do string handling?
I didn't say that. I said it's impossible to do it in a sane way, and anything that requires you to worry about memory management is *not* sane.

> Arbitrary-precision arithmetic? I just use GMP for that if we are talking about serious need for precision.
GMP-based code is utterly unreadable due to the lack of automatic memory management and operator overloading. Anybody who denies this probably has no idea what good, elegant and simple code looks like.


(Log in to post comments)

Why learn C? (O'Reilly Radar)

Posted Jun 30, 2012 17:13 UTC (Sat) by HenrikH (guest, #31152) [Link]

>Even if what you say is true, it's just an anecdote with no representativeness whatsoever.

Of course but I have yet to meet anyone that can write a similar application in another language quicker than I do in C, and I have worked on thousands of projects.

>I didn't say that. I said it's impossible to do it in a sane way, and anything that requires you to worry about memory management is *not* sane.

No you say that You have the right to define what is sane or not and thus it doesn't matter what the rest of us say, it will always be defined as not sane by you.

>GMP-based code is utterly unreadable due to the lack of automatic memory management and operator overloading. Anybody who denies this probably has no idea what good, elegant and simple code looks like.

GMP has automatic memory management under the hood, there is no need to resize the integers etc, and while there is no operator overloading I hardly think that "mpz_add (a, b, c);" is that much harder to read than "a = b + c;".

Actually I think that the first is easier to read since I know by reading the code that the function that performs the action is mpz_add() while I in the other case has to hunt down what class is used, what the overloads are etc.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds