Bjarne Stroustrup On Concepts, C++0x
An anonymous reader writes "Danny Kalev has an interview with Bjarne Stroustrup about the failure of concepts, the technical issues of concepts, whether the ISO committee's days are over, and whether C++ is at a dead-end. 'I don't think that concepts were doomed to fail. Also, I don't think concepts were trying to fix many things or to transform C++ into an almost new language. They were introduced to do one thing: provide direct language support to the by-far dominant use of templates: generic programming. They were intended to allow direct expression of what people already state in comments, in design documents, and in documentation. Every well-designed template is written with a notion of what is required from its arguments. For good code, those requirements are documented (think of the standard's requirements tables). That is, today most templates are designed using an informal notion of concepts.'"
What's really unfortunate is that he's one of the very few language maintainers out there that isn't of the mentality "Rah rah! My language/tool/design-philosophy/whatever is the solution to all your problems and will take over the world tomorrow."
Care to actually provide the names of those other language maintainers, with appropriate citations, that make such claims?
You've never seen a Python coder, have you?
He said language maintainer, not language user. Care to quote the Python language maintainer(s) making such a claim?
What are those people supposed to say about their language? That it sucks? That user's shouldn't use it? None of those quotes imply anything that you are claiming. Those are just snippets telling people what the positives of using their languages is. In the case of Ruby the maintainer even says that if you are happy with Perl or Python that you shouldn't switch to Ruby. That's hardly a claim of "my language is the solution to all your problems and it's going to take over the world".
C++ is far from dead in all piece of code that need performances. Intel released a C++ library called TBB to use multi-core architecture a few years ago. They do not believe it is dead. Parallel programming framework such as cilk stoped using C to use C++ to gain templates.
Don't get me wrong, for most task people don't care about the performance provided by a low level language and thus don't need it. It is even harmful to use C++ if you are not going to do it properly.
What on earth does a GUI have to do with a language? A GUI belongs in the C++ specification about as much as Java belongs in the kernel.
Each has its place and is used when necessary and shouldn't be forced into a place it doesn't belong for convenience.
- Michael T. Babcock (Yes, I blog)
All that you want exists already, no need to wait 20 years - in fact, it was there already when you've started waiting! It's called Common Lisp.
It's the only language I know of where you can use its macro facility (reader macros, to be specific) to fully implement another language with arbitrary complex syntax. In other words, a program written in any textual language can be a Common Lisp program if you insert a corresponding CL reader macro definition at the beginning of the code.
Come to think of it, maybe the fact that it hasn't taken over the world yet has something to do with that...
Kalev's questions came across as ignorant and belligerent, but Stroustrup answered all of them intelligently, thoroughly and patiently. It's good to know that there are men like Stroustrup still working hard on C++, even though I no longer do much work in it.
They are supposed to make the claim against the area for which their language is most appropriate. Although to be fair, it is often the people who are marketing the self-help books that tend to be the most vocal advocates of a particular language. I remember picking up an early O'Reilly book on Perl in a bookstore and reading the introduction and putting it back on the shelf in disgust because of the zealousness of the advocacy in the introduction.
I have also been down the "should not" path on several languages much to my chagrin. Fortunately, I've paid the price allowing me to spare my students the pain.
Atlas stands on the earth and carries the celestial sphere on his shoulders.
Well, many type errors are discovered at compile time. Unfortunately, static typing tends to have the side effect of requiring more complex code, and often has to be worked around.
Personally, I write mostly in Java and Ruby. Java is pedantically static to a level that would make C++ blush, while Ruby is completely duck typed. I've had situations where Java's pedantic nature has caught bugs before test runs, but I've also had situations where the code was 10x as long and harder to debug because of the inflexibility. I think it's highly debatable which approach is better, and the answer probably depends on the kind of problem you're solving.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Larry Wall of Perl: "Perl is designed to give you several ways to do anything, so consider picking the most readable one. " - From the Perl Man Pages
Wait, wait, wait. You're seriously citing THAT as an example of (quoting from the GGP)
"Rah rah! My language/tool/design-philosophy/whatever is the solution to all your problems and will take over the world tomorrow."
?
The other examples are actually quite similar; Ruby says, in essence, "we think Ruby is good", and Java says, in essence, "Java is good". Nothing wrong with that - certainly it's not saying anything about other languages. In fact, in Ruby's case, it's explicitely said that if other languages work for you, then by all means continue using them.
But Perl? You're even crazier there. Larry isn't even saying "Perl is good"; in fact, his quote could just as well have come from someone who does NOT like Perl but still wants to give some useful advice (advice that, one might add, is applicable to just about EVERY programming language).
If that's your idea of "rah rah take over the world!", then you must be from Bizarro World - you're not even wrong.
It is even harmful to use C++ if you are not going to do it properly.
For example:
Hehe, it does seem a pretty good symbol of C++'s syntax: bits of syntax that make sense individually turning into a monstrosity when combined.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
It's well designed
I would disagree. Anonymous inner classes are clearly a hack necessitated by a lack of first-class function types. Lack of a more concise capturing mechanism (i.e. true lambdas) is crippling. There's nothing in the language to help solve, or even warn about, the brittle base class problem (@Override is one piece of the puzzle, but more are needed to solve it - see C# for a proper take on this problem, and API versioning in general). Type-erasing generics are one huge hack (I don't care about perf, but they are simply not first-class, and not fully typesafe - consider `instanceof` for a generic interface). Etc.
and efficient - so much so that you can implement other languages in it, to speed them up significantly.
Can you give any example of something being sped up significantly by reimplementing it in Java?
C/C++, ASM, and Java are basically the big three that everything is built on top of. Many people would be shocked that an interpreted language could make the cut.
I wouldn't be shocked, as Java isn't an interpreted language. JIT compiler still produces native code. And back when there was no JIT, Java was slow.