One of the problems is that, at 1200 pages of concise specification, the language can be said to be too complicated. No body except a compiler expert can be expected to master such a complex beast. The rest of mortals will know and use a few percent of all that, but the language will be full of sharp edges and pointy corners, waiting until you find them by accident, ready to burn a week worth of your time chasing some weird behavior.
Maybe it's time to try to reduce and simplify C++ instead of adding more and more features. Wouldn't it be great if a concise and regular dialect of C++ could be specified in 120 pages, instead of 1200?
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 23, 2011 3:25 UTC (Mon) by neilbrown (subscriber, #359)
[Link]
> Maybe it's time to try to reduce and simplify C++ instead of adding more and more features.
As the same time that Sun was working on Oak (which became Java), there was a team working on "Clarity" which was meant to be a simpler C++... I wonder what became of that (i.e. I cannot be bothered hunting to find an answer, I want someone to tell me :-)
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 24, 2011 17:23 UTC (Tue) by cmccabe (guest, #60281)
[Link]
It would be interesting if C++ had a "use strict" mode similar to Perl. Something that would try to eliminate the worst abuses. The problem is that there really is a lot less consensus on what "the worst abuses" are than in Perl. I have my own list, but I'm sure that posting it here would generate a flamewar (and probably lead to me educating a lot of people about obscure C++ trivia).
I know that you realize this (and clearly all the kernel developers do too), but a lot of developers don't realize that you can use C exactly like a "simpler C++." Instead of classes, you have functions which all take a pointer to a struct. Instead of private methods, you have functions which are static to a file. Instead of virtual functions, you have tables of function pointers.
I would also encourage anyone who is tired of C++ to check out Google Go. At least give it a try.
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted Jun 5, 2011 11:07 UTC (Sun) by JanC_ (guest, #34940)
[Link]
I'm sure somebody can write a 2400 page book to define a safe subset of C++ ;-)
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 23, 2011 7:27 UTC (Mon) by zorro (subscriber, #45643)
[Link]
You have to ask yourself how many pages of those 1200 pages describe the core language. In the current standard, about 300 our of 750 pages is language specification and even these contain plenty of examples and notes.
What Every C Programmer Should Know About Undefined Behavior #3/3
Posted May 23, 2011 9:51 UTC (Mon) by marcH (subscriber, #57642)
[Link]
> Maybe it's time to try to reduce and simplify C++ instead of adding more and more features.
It never works that way. Backward compatibility is just too valuable, even more valuable that the burned weeks you just mentioned.
What happens is that new, safer languages gradually take the place of C/C++ everywhere performance is not as critical. And this is a Good Thing. C++ has been far too successful, way beyond the space it's the best choice.
You're tired of the kids repeatedly crashing the Formula 1 when going to the supermarket? Just buy them a minivan. You will have more time to focus on the next race.