Argh. How is this relevant?
Argh. How is this relevant?
Posted Nov 14, 2008 13:38 UTC (Fri) by khim (subscriber, #9252)In reply to: True, but how often it happens? by epa
Parent article: Things that go Clang in the night: LLVM 2.4 released (ars technica)
The whole discussion is kind of pointless.
Please read the whole thread starting with The problem with C++ is that it's neither meat, nor fish. It's not an unencumbered portable assembly for reusable library building, and neither it is a proper high- level language.
Basically the story goes like this: C++ is poor as "unencumbered portable assembly for reusable library building" AND it's poor as high- level language too (compare metaprogramming in C++ and Lisp, for example).
A main design goal of C++ was to provide a good language for building reusable libraries, a better alternative to C for this task.
Yes. And they failed. You can not use STL like you'll use Python - you need to know a lot of details and you can not use it as portable assembler too. Basically resulting language is useless for everyone - but you can try to shoehorn both low-level stuff and high-level stuff in C++. The question is: why not use suitable language for these purposes? C for low-level stuff (much closer to hardware then C++) and Java/Python/Ruby (much safer) for high-level stuff?
C++ is "new PL/I" - the language which must be equally good for all kind of tasks but which is equally bad for all kind of tasks instead...
I suppose you would call C++ unencumbered, if you care about that, because you don't pay for anything if you don't use it.
You do pay for features worth having (exceptions and RTTI) and features which cost you nothing don't buy you much.
The same code for calling the multiply function or freeing memory would have to be written anyway, and it doesn't make it any more efficient at runtime to use a more verbose syntax.
When you see how much code this thing actually needs you'll try to avoid such code. When it's generated by compiler it looks like it's really free where it's not.
