Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

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!"
This discussion has been archived. No new comments can be posted.

Stroustrup Says New C++ Standard Delayed Until 2010 Or Later

Comments Filter:
  • Not a bombshell (Score:5, Informative)

    by shutdown -p now ( 807394 ) on Thursday July 23, 2009 @02:57PM (#28798491) Journal

    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.

  • by Anonymous Coward on Thursday July 23, 2009 @02:59PM (#28798525)

    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.

  • by ardor ( 673957 ) on Thursday July 23, 2009 @03:07PM (#28798639)

    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)

    by Eddy Luten ( 1166889 ) on Thursday July 23, 2009 @03:08PM (#28798659)
    Cocoa is an API, Objective-C is the language.
  • by Anonymous Coward on Thursday July 23, 2009 @03:09PM (#28798663)

    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)

    by Anonymous Coward on Thursday July 23, 2009 @03:15PM (#28798765)

    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!

  • by MobyDisk ( 75490 ) on Thursday July 23, 2009 @03:20PM (#28798831) Homepage

    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)

    by Elektroschock ( 659467 ) on Thursday July 23, 2009 @03:24PM (#28798907)

    Oh, and there is gnustep [wikipedia.org].

  • by Anonymous Coward on Thursday July 23, 2009 @03:25PM (#28798921)

    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.

  • by Sam36 ( 1065410 ) on Thursday July 23, 2009 @03:28PM (#28798965)
    typesafe and memory safe languages are written in c++ you insensitive cod!
  • Re:Namespace (Score:1, Informative)

    by Anonymous Coward on Thursday July 23, 2009 @03:39PM (#28799105)
    The language is still called C++. ALL languages use this idiom when referring to certain revision of a language. For example, before the last version of C was ratified, it was referred to as C9X. It's still called C, but you can talk about C90 vs C99.
  • by Freetardo Jones ( 1574733 ) on Thursday July 23, 2009 @03:46PM (#28799215)

    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.

  • by Tacvek ( 948259 ) on Thursday July 23, 2009 @04:03PM (#28799433) Journal

    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)

    by Procasinator ( 1173621 ) on Thursday July 23, 2009 @04:06PM (#28799469)

    There will be integer overflow after C++0xFF

    Fixed that for you.

  • by Anonymous Coward on Thursday July 23, 2009 @04:10PM (#28799511)

    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.

  • by CastrTroy ( 595695 ) on Thursday July 23, 2009 @04:13PM (#28799565)
    Azureus isn't a browser though. It downloads torrents. They do completely different things. A browser actually has to render images, animations, and even videos. It has to parse large amounts of HTML, CSS, Javascript, and make sense of all that so that it can display it on the screen. Torrent applications are basically glorified FTP clients. They don't have to display anything on the screen at all. They just have to manage a bunch of internet connections and save some data to the disk. It's like me saying that Notepad uses less memory than Azureus, therefore C++ is better. Show me a browser with a similar feature set to Firefox written in Java, and then we can talk.
  • by johnlcallaway ( 165670 ) on Thursday July 23, 2009 @04:24PM (#28799699)
    Gotta have the "auto" variable because expecting all programmers to know how to type efficiently or to understand what data types are being used isn't fair to those that haven't gained those skills yet.
  • Re:Why this is bad (Score:3, Informative)

    by shutdown -p now ( 807394 ) on Thursday July 23, 2009 @04:57PM (#28800123) Journal

    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).

  • by geniusj ( 140174 ) on Thursday July 23, 2009 @05:07PM (#28800271) Homepage

    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.

  • by Joce640k ( 829181 ) on Thursday July 23, 2009 @05:10PM (#28800311) Homepage

    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.

  • by dgatwood ( 11270 ) on Thursday July 23, 2009 @06:01PM (#28800887) Homepage Journal

    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. :-)

  • by farnsworth ( 558449 ) on Thursday July 23, 2009 @06:20PM (#28801113)

    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".

  • by loufoque ( 1400831 ) on Thursday July 23, 2009 @07:07PM (#28801573)

    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.

  • by shutdown -p now ( 807394 ) on Thursday July 23, 2009 @07:27PM (#28801767) Journal

    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]).

  • by maxwell demon ( 590494 ) on Thursday July 23, 2009 @07:30PM (#28801807) Journal

    Templates are useful, but "generic programming", doing arbitrary computation at compile time with templates, was a terrible idea.

    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.

  • by shutdown -p now ( 807394 ) on Thursday July 23, 2009 @07:35PM (#28801851) Journal

    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...

  • by Darinbob ( 1142669 ) on Thursday July 23, 2009 @08:32PM (#28802327)
    Yeah, the C with classes is a nice language. The C++ with std:: stuff can be a bit of a mess. The reason for arrays is that they're still much faster than vectors because compilers haven't figured out how to optimize a complex templates very well. If C++ wasn't used in an area where speed matters, then maybe you could get away with replacing fundamental types with compile time add-ons.
  • by Anonymous Coward on Thursday July 23, 2009 @09:41PM (#28802763)

    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.

  • by blancolioni ( 147353 ) on Friday July 24, 2009 @07:14AM (#28805259) Homepage

    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.

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...