Stroustrup Says New C++ Standard Delayed Until 2010 Or Later 501
wandazulu writes "At the end of an article written by the creator of C++, where he talks about removing a feature from the new C++ standard, he drops a bombshell: The new C++ standard (typically referred to as C++0x) has been delayed until 2010 or later. What does this mean? No new C++ features like threads, proper enum classes, or hash tables. C++0x is dead, long live C++1x!"
Not a bombshell (Score:5, Informative)
It's not a bombshell by a long measure. Anyone who had been tracking C++0x standardization process (reading comp.std.c++, and WG papers [open-std.org]) knows that the goal of getting the standard out by 2010 was fairly unrealistic, mostly because of concepts [open-std.org]. The joke that "x" in C++0x is actually a hex digit and not decimal has been around for several years now.
Headline misses the point completely (Score:5, Informative)
The headline completely misses the central part of the article and focuses on a very minor point. Everyone has known for quite a while that C++0x would actually be C++1x. There's only a few months left in 2009, so there's absolutely no surprise there. The real meat of the article is that support for "concepts", a key (and arguably the most anticipated) part of C++0x, is being dropped. That's a major disappointment to many people, including Stroustrup.
Re:And nothing of value was lost (Score:4, Informative)
Are you saying that C++0x is unnecessary?
If so, then you haven't stumbled upon C++'s many problems. Like, lack of rvalue references. Or, lack of a proper lambda.
Re:C++0A (Score:3, Informative)
Re:How about a REAL C++ feature.... (Score:2, Informative)
sure when those 'memory safe' languages produce efficient executables that do not require 400MB 'runtimes' to function. The net result from these sandbox environments is a bloated app that requires 5-10x more ram than is needed.
Re:C++0A (Score:1, Informative)
I assume this is some leetspeak attempt to say Cocoa, which indeed is an improvement over C++.
Sigh, kids today. And I thought this was Slashdot. FYI, there is this cool numbering system called hexadecimal. It's base 16:
D H AKA
0 0 0x00
1 1 0x01
2 2 0x02
3 3 0x03
4 4 0x04
5 5 0x05
6 6 0x06
7 7 0x07
8 8 0x08
9 9 0x09
10 A 0x0A
11 B 0x0B
12 C 0x0C
13 D 0x0D
14 E 0x0E
15 F 0x0F
2010 , take 10 into Hexadecimal. Voila. Il est perfect, mon ami! Manger des bebes! Parler Klingoner! Il est mort, Jim!
C++0x is really good though (Score:5, Informative)
I haven't been following C++0x, but after reading the C++0x FAQ [att.com] I am very pleased. It really fills a lot of the simple, practical holes in the language.
I think the success of C# is part of why these things are being considered. For example, C# recently added an advanced form of initializer lists - which is now in C++0x. Another example is the scoping of enums, which has long been a pain. Many coding standards require enums to be ALL_CAPS_WITH_UNDER_SCORES because they don't obey scoping rules: this is fixed. NULL is now replaced with nullptr, which is a minor improvement that looks much like how this was done in C++/CLI. (That's the bastardized C++ for .NET). Namespace cleanups, foreach, ... the list is huge, and it looks like C++ is "borrowing back" from Java and C#.
Competition is good.
I know that everything I just listed probably exists in many other languages, but C# and Java are very prominent in enterprise development, and are making huge gains. I will be very very glad to see a real ISO standard gaining ground again.
Re:C++0A (Score:3, Informative)
Oh, and there is gnustep [wikipedia.org].
Re:How about a REAL C++ feature.... (Score:2, Informative)
someone stop feeding this kiddie count chocula and remind him that his precious sandboxed languages waste cpu cycles...lots of them, and that trend is increasing. The unchecked bloat that is being output by these latest college grads who know nothing but c#, vb, and java are serving no one's interest besides the hardware vendors.
Re:How about a REAL C++ feature.... (Score:0, Informative)
Re:Namespace (Score:1, Informative)
Re:How about a REAL C++ feature.... (Score:3, Informative)
First: OO.o is Java.
Bzzzt wrong. Look at the code, it's 98% or so C++. The only parts that are Java are some database access layers and some stuff for multimedia. Way to show yourself as being an idiot for repeating this oft-repeated and incorrect meme.
Second: The language has little to no bearing on the amount of RAM being used. The amount of data being stored (and how it's stored), however, does. Firefox stores a lot of images and such, which, surprise surprise, eat up RAM.
So then you've just effectively nullified your own point since you were blaming the languages on the bloat instead of the crappy programmers.
Re:And nothing of value was lost (Score:3, Informative)
C++0x is just an evolution of C++. It does not add anything that is not already possible, but it does attempt to improve certain usecases. Adding threading support to the language core allows the standard library to be used with threading, and makes it easier to write thread-safe code. (As it is, you need to look up for each and every compiler/standard library pair you use which if any standard library functions are threadsafe.)
The hash-based containers have been fairly standard since the beginning, although there were slight incompatible differences between the implementations, which meant that portibility suffered if you used them. Now adopted by the Standard Library, you can use them in any C++ implementation that support C++0x (Which will be most of them. Even Microsoft plans to strive for a fully complaint implementation, minus a small number of legacy deviations (although they will always remain fairly far from perfect compliance)).
Much of the standardization effort is in bringing chunks of BOOST into the standard library, such that you can just use them without installing all of BOOST (which is pretty extensive). They are adding a few nice convenience features, such as lambdas (really useful with STL algorithms), and a few other features.
Just like any decent C compiler supports C99, all good C++ compilers will support C++0x. It is highly backwards compatible, although a few minor breakages will be present, especially if you use one of the few new keywords as an identifier.
Re:Buffer overflow (Score:3, Informative)
There will be integer overflow after C++0xFF
Fixed that for you.
Re:How about a REAL C++ feature.... (Score:1, Informative)
for a given task, they tend to, assuming both projects had competent programmers. It's not just about storage, it's also about execution performance. .NET comes closest but still does not compare with well written native code. The difference IS noticable. There is a reason microsoft still maintains their C/C++ compiler. There is a reason OS kernels aren't written in java. There are things that cannot be done in sandboxed languages, exercises in geek masturbation notwithstanding. Sure one CAN write an office suite in java or CSS/javascript, but the result is a slow painful mess for the user.
Re:How about a REAL C++ feature.... (Score:4, Informative)
Re:How about a REAL C++ feature.... (Score:4, Informative)
Re:Why this is bad (Score:3, Informative)
I would describe concepts as increasing the usability of templates because you start to get readable error messages, but I don't see anything that can be done with concepts that can't be done without.
Concepts let you "overload" templates depending on whether a template parameter conforms to some concept or not. You can do some of that right now with SFINAE, but it's a hack of epic proportions, and it doesn't cover all use cases (e.g. it doesn't let you test for members).
Re:How about a REAL C++ feature.... (Score:5, Informative)
Any garbage collected language requires more memory to operate than the program actually needs.. Otherwise you'd be garbage collecting 24/7. So yes, if you want to minimize GC cycles/pauses, your memory usage can be vastly higher than what the program would actually require in a traditional language. That's probably the big reason, for example, that the iPhone doesn't support GC in its Objective-C implementation.
Re:How about a REAL C++ feature.... (Score:2, Informative)
Um, yes. And they do.
Take a look at something like Acronis TrueImage (or any Norton program) before/after their transition from C++ to C++-with-C#-user-interface.
Installer before: 29Mb
Installer after: 290Mb
Memory usage: Completely unusable on a 512Mb machine
nb. I use these as an example because they're the only commercial apps I can think of that use .Net.
Re:How about a REAL C++ feature.... (Score:3, Informative)
It's not necessary to check a return value if you don't care if the action succeeded or failed. One could reasonably argue that (at least in GUI application) printf qualifies as just such a throwaway statement.
As for returning an exit status, AFAIK, both C99 and C++ codify that a main() function should implicitly return zero if the end of the function is reached. Thus, that's also correct, although one could argue that the behavior was OS-dependent back when that code was originally written, and thus it has only become correct in the past decade or so. :-)
Re:How about a REAL C++ feature.... (Score:3, Informative)
Where are they? If C# and Java are so great, where are the apps?
gmail, amazon, your online banking, etc.
Firefox memory usage is a mystery to me. I can't conceive of how it uses so much memory just to show a few pages of text with embedded images.
Modern web standards are extraordinarily complicated. The current html spec is 756.93 KB alone. Add to that css, js, xml, http, etc. Add to that compatibility with the millions of existing web pages, and all of a sudden you have a ton of complicated code in order to display "a few pages of text".
Syntactic sugar, no more. (Score:4, Informative)
C++0x adds syntactic sugar, no more.
I'm actually relieved to see concepts dropped, that was probably the biggest useless sugar ever (axioms were not just sugar, but they were the part less ready for inclusion anyway). Everything concepts can do can already be done in C++03 with SFINAE with expressions (which, thankfully, was required explicitly in C++0x unlike C++03 which is quite vague on that topic).
Lambdas are monomorphic, thus useless. Even a DSEL can do better. Worse, even MACROS can do better (since there is no stupid limit on templates being declared at file scope anymore).
Rvalue references is just broken magic; relying on NRVO works just fine to implement move semantics and is not as senseless.
The only real update that comes with C++0x is fixing the standard library so that it doesn't require stuff it doesn't need. Nothing developers haven't already solved by implementing their alternative to the standard library.
Yet, C++ remains the most awesome language ever.
Too bad the committee isn't working on actually useful additions, such as virtual templates, which would allow it to compete with dynamic typed languages such as Python.
Re:How about a REAL C++ feature.... (Score:5, Informative)
Take a look at something like Acronis TrueImage (or any Norton program) before/after their transition from C++ to C++-with-C#-user-interface.
As someone who worked in Acronis, and wrote a bunch of code for True Image, I feel obliged to tell you that there's no C# code in it at all - it's all pure C++. Acronis SDK (which is a separate thing, and IIRC comes only with True Image Enterprise) has component that exposes .NET API, and that's written in C#, but it's separate from True Image proper, and those C# APIs are just sanitized wrappers on top of the original COM API (which is implemented in C++), and, in fact, most of C# code there is automatically generated from COM interfaces (I know that because I'm the guy who originally designed that part of it).
As for GUI in True Image (and pretty much all other Acronis products) - it's FOX Toolkit [fox-toolkit.org], or rather, forked and heavily-customized version of it (since it's LGPL'd, you can request the source code with customizations here [acronis.com]).
Re:Template la-la land. (Score:2, Informative)
Doing arbitrary computation at compile time with templates is called "template metaprogramming." The "generic programming" is what the STL does: Provide a single templated implementation for an algorithm working out of the box on vastly different data structures.
Re:C++0x is really good though (Score:4, Informative)
A couple years ago, I looked into it again out of curiosity, and saw how far it had come since the introduction of a credible competitor (C#). Swing (it's GUI system, for those who aren't familiar with it) had gotten fast, printing turned from a lame dog into a sports car, and the core language had gained features it lacked until they appeared in C#.
Unfortunately, it's still lagging behind. Java may have gotten autoboxing, enums and varargs because C# had them, but in the meantime C# got lambdas (which are arguably far more important in the big scheme of things, and definitely have a bigger impact on how one writes code). And lately, Java language evolution looks like it has stagnated.
Of course, there's Scala to consider. If only someone with deep pockets would back it...
Re:How about a REAL C++ feature.... (Score:3, Informative)
Re:How about a REAL C++ feature.... (Score:1, Informative)
Java programs are pretty common. A lot of "internal business apps" are written entirely in Java. For example look at financial software (look up job postings for hedge funds), Operations/Supply chain tools (i2 ) or many other programs that gets outsourced to third parties (IBM, Infosys and others).
These applications have the advantage of being run only on a specific configuration and so don't have to worry about the right JRE etc. Program size is often not a constraint and speed is pretty good. I have sometimes seen high frequency traders in stock markets code in Java.
Don't diss Java just because very few commercial apps get developed in it.
Same goes for C# - Microsoft convinced many large Java users to switch to C# (Dell was an early adopter). And nowadays anyone who uses Microsoft SQL Server uses C# to write apps around it.
Re:And nothing of value was lost (Score:5, Informative)
anything which continually scans the entire heap when you're out of RAM is a showstopping problem and makes GC useless for real applications.
Luckily, GC has advanced since the 1960s.