GCC begins move to C++
GCC begins move to C++
Posted Jun 1, 2010 3:27 UTC (Tue) by jrn (subscriber, #64214)In reply to: GCC begins move to C++ by HelloWorld
Parent article: GCC begins move to C++
One of the merits of idiomatic C is that it is easy to guess roughly what is going to happen on the machine due to your code. I cannot imagine an experienced C programmer using
for (i = 0; i < strlen(line); i++)
except to prove a point, for exactly this reason.
Especially amusing was this:
> Unless countless very respected computer scientists and programmers around the world are completely wrong, we just cannot deny that non-abstract, low-level code tends to be quite unmaintainable. This is the more true the larger the program is.
> Torvalds not only admits here that C, by its very nature, leads you to create non-abstract, low-level code, that C gives you the mentality required to create such non-abstract code, but he actually claims that it's a good thing that this is so.
How does one explain the Linux kernel? Of course it includes abstraction where appropriate, just like most reasonably-sized C programs do.
Posted Jun 2, 2010 18:35 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (4 responses)
Nope, it's a great example. Because C programmers routinely use examples which no sane C++ developer will ever write to prove that C++ is BAD BAD BAD. Why shouldn't C++ developers do the same?
"How does one explain the Linux kernel? Of course it includes abstraction where appropriate, just like most reasonably-sized C programs do."
Linux is good because it's not actually quite that big. Most of code is in the drivers. And its infrastructure code if fairly compact and has quite clean abstractions.
Posted Jun 2, 2010 18:45 UTC (Wed)
by ikm (guest, #493)
[Link] (1 responses)
Maybe because they don't have a problem with C?
Posted Jun 2, 2010 18:47 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Jun 4, 2010 9:53 UTC (Fri)
by jrn (subscriber, #64214)
[Link] (1 responses)
Good point. I get annoyed when C programmers do it, too. :)
Posted Jun 4, 2010 10:06 UTC (Fri)
by dlang (guest, #313)
[Link]
GCC begins move to C++
for (i = 0; i < strlen(line); i++)
except to prove a point, for exactly this reason."
GCC begins move to C++
GCC begins move to C++
GCC begins move to C++
GCC begins move to C++