Wednesday, April 1, 2009

the g is silent, or, the panda's thumb

An old interview with Brian Kernighan, translated from the Romanian...

The languages that succeed are very pragmatic, and are very often fairly dirty because they try to solve real problems. C++ is a great example of a language that in many ways has serious flaws. One of the flaws is that it tried very hard to be compatible with C: compatible at the object level, compatible very closely at the source level. Because of this there are places where there's something ugly in the language, weird syntactic problems, strange semantic behaviors. In one sense this is bad, and nobody should ever do that, but one of the reasons that C++ succeeded was precisely that it was compatible with C, it was able to use the C libraries, it was usable by the base of existing C programmers, and therefore people could back into it and use it fairly effectively without having to buy into a whole new way of doing business.

the rest here

6 comments:

Anonymous said...

I know nothing about programming, but I'm always amazed about how much someone can do with C++.

Anonymous said...

Well, technically...

All programming languages (on a non-quantum computer) reducible to Turing complexity are equally as powerful. Since this is true of all programming languages we have, "in theory", all programming languages are pretty much the equivalent of the other in terms of power. Or better put, sophistication.

(All very hand-wavy, I know, but the mathematics behind the above is transcendental, and I'll never understand it all. Never mind Einstein, Turing is where it was at for 20th century geniuses...)

But I know what you mean - C++ is one fantastic language, and it encourages good programming habits. I wish I used more of it... But in today's web-engineering world, a mock-up is as good as the final product, so garbage collection and proper pointer use are ancient relics.
- Hassan

K said...

All programming languages can express anything computable (the math is not all that mysterious, in my opinion). But that doesn't mean all programming languages are equally good. I'm shocked that anyone would ever use C++ voluntarily—though perhaps most users have no other choice. You might like this "interview" with Bjarne Stroustrup on the origin of C++...

When it comes to C++, the naive think: wow! C++ lets you get away with anything! The experienced realize that this is exactly why it's such a disaster.

Anonymous said...

@ K: Well, to be fair, my knowledge of math is certainly no yardstick for competency, so my difficulty with the material may not be saying much. :-) Though, I wasn't really claiming all languages were equally good. But then, you may not have been saying I was...

Nevertheless, I find it most interesting that you find C++ a permissive language, as I found it the more unforgiving of the languages I had to learn. I mean, Java just makes code whiz straight from stream-of-consciousness to the whitespace, so since that gets the job done, I mostly use that. Never had to call a destructor since 2004!

I feel like most languages I know seem to be similar generous to the programmer, but then, I'm far from being an expert, so I'm really curious about languages you find to be more strict about coding practices.

- hassan

radian said...

http://anfischer.com/

"Andreas Nicolas Fischer is a Berlin-based artist. He works with data, sculpture and code. "

Thought you might enjoy this guy's stuff.

Joseph Edward Ryan said...

When is 'Your Name Here' coming out in hardcopy?