Live data from Hacker News

Linus vs C++, again

realworldtech.com

1–10 of 209 posts

Re: Linus vs C++, again

#3
I actually liked his point about context very much. In fast moving projects changes are visualised in terms of diffs, and the closer the code is to what will be executed, the more chances that obvious flaws will be caught. btw related discussion in an older thread - http://news.ycombinator.com/item?id=1318489

Re: Linus vs C++, again

#4
Linus has a touch of what I think makes Steve Jobs great: the ability to say no and stick by those convictions. No argument from me that Linux is wildly successful and one of the most important tech developments in the last 10 years.

However, I always cringe when I read some of his comments that seem to reject any element of forward progress. While C++ certainly has its share of issues, Linux will never evolve if the programming paradigm stays in the 60s. My gut feel is there is a lot of opportunity to do better over the next ten years.

Re: Linus vs C++, again

#5
C as a context free language? Bullshit. How many global variables are there? How many functions with ridiculous names like htons?

Edit:

I realize that "context free language" was a poor choice of words; i meant it in the sense that linus did - his claim that you can 'look at a piece of code and understand what it does' is laughable in the face of accepted c programming styles.

Re: Linus vs C++, again

#6
It is funny how a very simple and innocent looking question by "newbie" started a big discussion. It is like watching somebody drop a candle in a bed.

    Can you use C++ in Linux kernel?
    In windows kernel you can, with some restrictions.

Re: Linus vs C++, again

#7
There's not much "Linus vs C++" in there (except for several random bashes with nothing to back them up). It's mostly Linus sharing his POV as the maintainer of the kernel as to why C++ would be harder to work with in a project that has many contributors due to code being more context dependent (i.e member functions, function overloading).

Re: Linus vs C++, again

#8
That is a huge problem for communication. It immediately makes it much harder to describe things, because you have to give a much bigger context. It's one big reason why I detest things like overloading - not only can you not grep for things, but it makes it much harder to see what a snippet of code really does.

I think this is a limitation of our using flat text to program in. So long as our primary means of communication is linear speech and flat text, we will have this communications overhead. Collaborative systems that display the context to all concerned can overcome this. In fact, this is already happening! (Exercise for reader.)

Re: Linus vs C++, again

#9
As I get older and grumpier I tend to appreciate Linus' point of view more and more. It's easy to get swept up by arguments of the expressiveness of a language, particularly in small examples. However, I think in the long run it's better to have very explicit code. The less jumping around and inference I have to do to figure out what a block of code does the more likely it is that I understand it and that I can quickly verify that it does what it needs to do. If that makes code a little more verbose I think it's usually still worth it.

Re: Linus vs C++, again

#10

C as a context free language? Bullshit. How many global variables are there? How many functions with ridiculous names like htons? Edit: I realize that "context free language" was a poor choice of words; i meant it in the sense that linus did - his claim that you can 'look at a piece of code and understand what it does' is laughable in the face of accepted c programming styles.

Ironically, this is an overloaded usage to the words "Context Free Language." (Whether you intended it or not.)
Post reply on HN