Slashdot Mirror


Latest Proposals for C++0x

CodeDemon writes "It looks like the ISO/IEC JTC1/SC22/WG21 working group has made some headway in reviewing new proposals for the C++ language. The long anticipated upgrade for C++, C++0x, may be just around the corner. Head on over to check out the proposals yourself."

39 of 911 comments (clear)

  1. It keeps going and going.... by deman1985 · · Score: 4, Funny

    And I thought the next version of C would be +++... and then ++++

    1. Re:It keeps going and going.... by Anonymous Coward · · Score: 4, Funny

      C++H0--NO CARRIER!

    2. Re:It keeps going and going.... by kevinank · · Score: 5, Funny
      Well, since there was never a "C+" language, and you increment variables by one with "++" (hence the inherent joke in the name "c++"..."c incremented by one") a more logical construct would be (c++)++

      I'm rooting for C+=2.

      --
      LibBT: BitTorrent for C - small - fast - clean (Now Versio
    3. Re:It keeps going and going.... by MouseR · · Score: 4, Funny

      Actually, I would have chosen ++c++;

    4. Re:It keeps going and going.... by Davorama · · Score: 4, Funny

      Nah, it should become C double plus good...

      --

      Davo -- Free speech, free software, AND free beer.

    5. Re:It keeps going and going.... by Cinematique · · Score: 4, Funny

      It'd be like eBay feedback...

      Great language!! Would code in again!!! C++++++++++++++++++

    6. Re:It keeps going and going.... by Speare · · Score: 4, Funny

      And the other joke of an Object-Oriented COBOL being named, ADD ONE TO COBOL.

      --
      [ .sig file not found ]
    7. Re:It keeps going and going.... by j7953 · · Score: 4, Funny
      hence the inherent joke in the name "c++"..."c incremented by one"

      Yes, but it's postincrement, so the result is still C without any added value ;-)

      --
      Sig (appended to the end of comments I post, 54 chars)
  2. Supercalifragilisticexpialidocious! by Dark+Lord+Seth · · Score: 5, Funny
    ISO/IEC JTC1/SC22/WG21

    Someone try to say that ten times fast!

  3. C++0x ? by Cipster · · Score: 5, Funny

    Sounds like the l33t version of C++
    The hardest part is deschiphering the comments...

  4. Alan by grub · · Score: 4, Funny


    What does Alan C++0x think of this?

    --
    Trolling is a art,
  5. Re:where does the name come from? by Joe+Decker · · Score: 5, Informative

    Language revs are often referred to by the year of the completion of their standardizatioin (e.g., C++98.) The next C++ would presumably be somewhere in this decade, e.g., C++05 or so, but of course nobody is sure what year the work would be completed in, ergo C++0x.

  6. Re:where does the name come from? by alefbet · · Score: 4, Interesting

    The current version of C++ is often referred to as C++ 98 because it was finalized in 1998. The next standard should be finalized around 2007ish, so it's sometimes informally referred to as C++0x (think Windows 9x).

    --

    A hack is just an idiom waiting for wider use.
  7. Re:where does the name come from? by MrCocktail · · Score: 5, Insightful

    I too read it as "C++ followed by some hex number to be named later", but after skimming very quickly through the proposal, it seems they meant "C++ (20)0x, where x depends on whatever year the spec/implementation/whatever is released". Or, at least, that's what I think it means.

  8. C++0x? by Anonymous Coward · · Score: 5, Funny

    You mean...the successor ISN'T C#?!

    I've...I've been living a lie...

  9. Anonymous array members by Surak · · Score: 4, Interesting

    Honestly, I don't see how this is a big improvement. You have, basically:


    struct somestruct {
    int a;
    int [3]; //3 pad bytes
    int b;
    }


    vs.


    struct somestruct {
    int a;
    int pad[3]; // 3 pad bytes, do not use
    int b;
    }


    The only thing its really saving you is the variable name, and its giving you an extra check at compile time to ensure you don't use the 'pad' array. Which shouldn't be a problem with proper variable naming and documentation, right?

    1. Re:Anonymous array members by Abcd1234 · · Score: 4, Insightful

      Okay, I'm normally not a vocal C++ basher (although I do dislike the language), but this is a really excellent example of the kind of cruft that has made it into C++. It's like everyone and their dog had some pet feature they wanted included in the standard, and the result is a huge mess of stuff that most people won't use but the compiler is forced to support.

      I suppose this is what happens when you allow a programming language to be designed by a committee...

  10. COBOL by mikeee · · Score: 5, Funny

    I'm still waiting for the object-oriented business programming language, "ADD 1 TO COBOL".

    1. Re:COBOL by Surak · · Score: 4, Interesting

      Actually, there *does* exist an Object-Oriented COBOL. (No, I'm NOT making this up!)

  11. Alan C++0X by sulli · · Score: 4, Funny

    This is what happens when he's happy to see you!

    --

    sulli
    RTFJ.
  12. c += 2 by Doomdark · · Score: 5, Funny
    Yeah, but that wouldn't be backwards compatible! (wouldn't compile with current compilers).

    So let's see; somebody else already proposed (c++)++ , which is a reasonable suggestion... but... um... how about "c += 2"? For now, it's as concise as the alternative, but going forward it will scale better (c += 3 vs ((c++)++)++ ).

    --
    I like paying taxes. With them I buy civilization -- Oliver Wendell Holmes
    1. Re:c += 2 by JanneM · · Score: 5, Funny

      On the other hand, maybe the ((((c++)++)++)++)... system will induce LISP-hackers to take a serious look at the language. /Janne

      --
      Trust the Computer. The Computer is your friend.
  13. SCO by ikewillis · · Score: 4, Interesting
    Watch out, SCO thinks it owns C++:

    MozillaQuest Magazine: C++ appears to be one of the properties that SCO acquired through Novell's acquisition of AT&T's UNIX Systems Laboratories and subsequent purchase of Novell's UNIX interests by SCO. At this time most Linux and/or GNU/Linux distributions include C++ compilers and editors. Is this something for which SCO currently charges? If so, just what are the current arrangements? If not, will C++ licensing and enforcement be added to SCO's licensing and enforcement program?

    Blake Stowell: C++ is one of the properties that SCO owns today and we frequently are approached by customers who wish to license C++ from us and we do charge for that. Those arrangements are done on a case-by-case basis with each customer and are not disclosed publicly. C++ licensing is currently part of SCO's SCOsource licensing program.

    MozillaQuest Magazine: How about GNU C++? Does GNU C++ use SCO IP? If so, could SCO license and/or charge for use of its IP in GNU C++?

    Blake Stowell: I honestly don't know.

  14. More on D by Randolpho · · Score: 4, Insightful

    I know talking about D is already redundant on this article, but I'd like to anyway. Improving c++ is great, but where c++ *really* needs improvements is the syntax. It's time for c++ to move into the 90s and get rid of the preprocessor. It's unnecessary with modern compilers, and it's a pain in the ass.

    One of the stated goals on the .pdf file linked is to make c++ easier to learn, but many of the syntactic kludges in c++ (like the preprocessor and the differences between a pointer and a reference) confuse the hell out of newbies. It's time to adopt a syntax more like Java while retaining the power of native compilation and library creation that c++ gives.

    In short, it really *is* time to move to D.

    --
    "Times have not become more violent. They have just become more televised."
    -Marilyn Manson
  15. Re:Why C didn't progress to D.. by td · · Score: 4, Informative

    B didn't come from anything called A, but from a language called bon, named for Ken Thompson's wife Bonnie. (At least, that's what Ken says, but he's famous for pulling the legs of people who drool over stupid trivia from his past.) The inspiration for bon was Martin Richards' BCPL, a stripped version of Christopher Strachey's [et al] CPL (Combined Programming Language, I think; the B in BCPL is for Bootstrap or Basic, sources differ.) It doesn't stretch the truth too far to think of B as an even-more stripped down BCPL.

    --
    -Tom Duff
  16. It's great to see some metaprogramming related... by exp(pi*sqrt(163)) · · Score: 4, Interesting
    ...proposals. Without metaprogramming C++ really is glorified C. But with metaprogramming C++ becomes an entirely new system. The template system is computationally complete (see here for what that means) and so important work can be shifted to compile time. That doesn't just mean computing the answer at compile time, that would be silly. It means procedurally building and optimizing code. For example we all know that C is slower than FORTRAN because pointers (lacking in FORTRAN) bring in variable aliasing problems that stop the compilers reliably optimizing. C++ metaprogramming allows us to claw back some of that loss by intelligently building optimized math routines at compile time. See Blitz++ for examples. The net effect is the speed of Fortran combined with readable high level references to array and vector objects.

    Unfortunately metaprogramming is a pain in C++. One of the biggest problems is the lack of reflection in C++ that would allow template metaprograms to easily determine type information. Some of the new proposals would remedy that issue. Also the use of local classes in templates, that is sorely lacking in the current standard, would be a great boon for such techniques.

    And maybe one day there will be many more C++ textbooks that don't just relegate templates to half a paragraph in the "advanced techniques" section. Templates are fundamental to C++. If you don't use the benefits of C++ then C++ really isn't that interesting a language. No wonder so many people propose using C rather than C++. It's like programming in Lisp but refusing to use list datastructures.

    --
    Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
  17. hehe.. sorta by Cthefuture · · Score: 5, Insightful

    I can understand where you're coming from. C++ is a complex beast. I've been using some form of C++ for over 10 years (well before it was standardised) and I still don't understand everything about it.

    With that said, it's an extremely powerful and flexible language. Very much more powerful than Java or C#. The complexity is mostly due to its flexibility. You can do (almost) anything with it. Of course, we can argue whether that's good or bad.

    I think C++ can learn from Java though. The default should be to pass all non-built-in-type function parameters by const reference and the programmer has to specify otherwise (basically opposite of the way it is now). That would clean up the code a whole lot since 99% of the time that's what you want anyway. And the standard C++ library should have some sort of garbage collector available.

    Another problem I have with C++ is that even with all its power you have no way to get to the "left hand" variable of operations. For example, if you have a matrix class you can overload the "+" operator so that you can do things like "matrix3 = matrix1 + matrix2". However, that's not going to be very efficient (assuming that's why you're using C++ in the first place) because there is no way to get to the matrix3 variable from inside the + operator. That forces you to use a temporary variable to add the two matrices then copy by value the whole matrix after adding matrix1 and matrix2. There are tricks around this problem but none are clean.

    --
    The ratio of people to cake is too big
  18. Uh, no. by devphil · · Score: 4, Insightful
    Everyone knows the history of C, coming from B, which came from A.

    Everyone but you, friend.

    The language C was descended from the language B, which was descended from the language BCPL. Dennis Ritchie never decided whether C followed B because it was alphabetical (in which case C++ would have been D), or whether C followed B because it was the next letter in BCPL (in which case C++ would have been P).

    As for the C++0x thing, it's quite common to call languages by the year of their standardization, thus "FORTRAN77", "FORTRAN90", "C89", "C99", "C++98". The next cycle for C++ will be completed sometime in the next seven years, but we don't know exactly which year, so "0x".

    Either way, it doesn't look too exciting judging from these proposals. It's certainly nothing on the scale of Perl 6 compared to Perl 5, so yeah, maybe I've answered my own question. This is just a routine standards adjustment, rather than a real 'development.'

    Again, uh, no. If it doesn't look "exciting," perhaps you're simply looking at the wrong proposals. Or perhaps you simply still think of C++ as "C with more type checking, and those // comments."

    The routine standards adjustment came in the form of "TC1", which was just recently published. Basically, "C++98.0.3p4rc2", to put it in Linux terms. Just bugfixes. C++0x is a different story.

    (And I don't know that I'd call Perl 6 particularly innovative, either.)

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  19. Re:Whatever. by Austerity+Empowers · · Score: 5, Insightful

    I think C++ is quite useful, and I'm not a "2 week IT person", not that I think they are necessarily inferior beings. On another note, most IT people I know tend to make the most use of Perl/Ruby/Python since it solves most of their problems quickest.

    Straight C is my favorite tool and what I use for embedded programming, quick hacks and performance constrained work. Every time I try to do a large application with it though, I find myself thinking "you know, they already did this exact thing with C++, and I'm going to spend 2 days re-inventing this and testing it".

    I use tidbits of Assembly (80x86, MIPS, Arm, PowerPC, what have you) in embedded systems for device driver or performance critical sections. As a HW engineer I tend to use this a lot in bringup of new designs, especially "very new" designs that don't necessarily work and every instruction is important.

    I use C++ when I am building a very large, flexible application where I use many types of data structures and need it to get up and running in a short period of time. I like this language for "serious application" programming.

    I use Perl to manage my file system, do text processing and other maintenance hacks.

    I use Java for simple GUIs that often work as a front end for serious endeavors.

    I use TCL/TK for ASIC/FGPA debugging (simulator interface) and test suites.

    I use fortran less and less (often I convert to C) for purely numerical computation. Gems of knowledge exist in fortran code for optimized matrix related algorithms that are highly useful in 3D visualization.

    I have not found any practical use for Pascal or Lisp lately (the latter is useful for emacs, but I rarely mess with it).

    The point of all this is that much like you wouldn't use a screwdriver to drive a nail through wood (unless that was all that was available), you would tend to use whatever tool is best suited to a task. Us engineer types are supposed to be tool-makers and users of the highest order. It surprises me when I hear one of us suggest we should use our favorite tool to the exclusion of all others.

    I do not like C++ in terms of the performance and memory impact it infers, but when building large applications I do not have time to re-invent a linked list for the umpteenth time, nor do I want to debug every different link list in my code, there are much harder problems to solve more critical to the success of my project. That said, C++ (and C for that matter) is lacking in some very important things. Among those I think are critical are: multithreading, network stack framework (platform independent that is) and GUI framework (platform independent!). If you read the article, you'll see mention of at least two of those things (we need a standard platform independent GUI library dammit!)

  20. C++0x is a Frankenstein Java by Anonymous Coward · · Score: 4, Interesting

    After working on the internals of the Std C++ library for several years I can honestly say that C++ is the biggest mess ever. The ANSI C++ committee is now trying to patch the language into a frankenstein version of Java.

    Unfortunately with Java 1.5, some of C++ is corrupting Java, mainly the completely academic confusing implementation of C++'s templates. Why not go for a more easier to understand concept of templates as implemented by languages such as Haskell?

  21. So does everyone else. by devphil · · Score: 4, Interesting


    The most popular suggestion, during the original standards process, was: every time someone proposes a new feature, they have to also propose an existing feature to be removed.

    The followup suggestion: every time someone proposes a new feature, they have to donate a kidney. This ensures that proposals will be given serious thought, and that a serious idiot can only propose, at worst, two extensions.

    No, I'm not joking. Those were some of the suggestions that received rare unanamous agreement.

    Seriously, everyone on the committee, from Stroustrup and Koenig on out, agrees that the language is too complicated. They even said so before it was standardized. But...

    Let's hear your suggestions on which stuff should be removed. Remember that no matter what you choose, people somewhere are currently using it, and you will break their code. No matter what you change, it will cause incompatabilities, which future generations of /. will then bitch and moan about.

    Also, since compiler vendors don't like pissing off their customers, they can't really completely remove stuff even when the standard says it's okay.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  22. Noooooooo! by timeOday · · Score: 5, Insightful

    In practice, C++ is finally getting to the point where various compilers accept the same code. That after 15 years or so. Now they want to shake it up again?

    1. Re:Noooooooo! by be-fan · · Score: 4, Insightful

      Its only been about 5 years since C++ 98 was standardized. And GCC has been very complient for about a year now, so it took 4 years for complient compilers to come out. That's really not *that* bad, considering that the latest push for complience was driven by the new wave of "Modern C++" techniques, which surfaced relatively recently. Further, a lot of the new proposals use pre-existing solutions (the Boost libraries are a big help here) and all the code that was added for template support seems to have some reusability value. See Vandervoode's comments about his C++ metacode extension, and how relativley easy it was to implement in the EDG C++ front-end, thanks to all the existing infrastructure.

      --
      A deep unwavering belief is a sure sign you're missing something...
  23. Re:What C++ really needs to do by slick_rick · · Score: 4, Insightful
    Delphi stomp who what? I think you mean VB an Java, not Delphi. ( I started with Delphi and remember it fondly, but you don't run across it much in the business world and never have). The reason VB succeeded is obvious, however the Java smash is more subtle. The real key in the enterprise is databases. There is no "one true way" of accessing a database through C++ (ALA JDBC or whatever model VB is using these days, it was ADO when I last had a VB contract.)


    The IDEs do also cater to the business community, probably why you don't see more Perl. The fact is "business software" is usually just glue, and Perl/Python/Java/VB/tcl will always be better glue then C++, because they were DESIGNED to be glue and C++ was designed to be the bricks and mortar.


    What I would really like to see in C++ would be compile-time exception enforcement ALA Java. I mean Jesus, when you are trying to work with a class library they can't even document what functions may throw what, how the hell are you supposed to write robust code? In Java this documentation comes for free when you write the function, and is forced to be correct by the compiler.

    --
    apt-get install redhat please god - Me (take it easy, I love Debian)
  24. TIME TO RETIRE C++ by Anonymous Coward · · Score: 5, Funny

    Hello Gentlemen,

    I'm a first year programming student at an Ivy League school and I've
    just finished my Visual Basic classes. This term I'll be moving onto
    C++. However I've noticed some issues with C++ that I'd like to
    discuss with the rest of the programming community. Please do not
    think of me as being technically ignorant. In addition to VB, I am
    very skilled at HTML programming, one of the most challenging
    languages out there!

    C++ is based on a concept known as Object Oriented Programming. In
    this style of programming (also known as OOPS in the coding community)
    a programmer builds "objects" or "glasses" out of his code, and then
    manipulates these "glasses". Since I'm assuming that you, dear reader,
    are as skilled at programming as I am, I'll skip further explanation
    of these "glasses".

    Please allow me to make a brief aside here and discuss the origins C++
    for a moment. My research shows that this language is one of the
    oldest languages in existence, pre-dating even assembly! It was
    created in the early 70s when AT&T began looking for a new language to
    write BSD, its Unix Operation System (later on, other companies would
    "borrow" the BSD source code to build both Solaris and Linux!)
    Interestingly, the name C++ is a pun by the creator of the language.
    When the first beta was released, it was remarked that the language
    would be graded as a C+, because of how hideously complex and unwieldy
    it was. The extra plus was tacked on during a later release when some
    of these issues were fixed. The language would still be graded a C,
    but it was the highest C possible! Truly a clever name for this
    language.

    Back to the topic on hand, I feel that C++ - despite its flaws - has
    been a very valuable tool to the world of computers. Unfortunately
    its starting to show its age, and I feel that it should be
    retired, as COBOL, ADA and Smalltalk seem to have been. Recently I've
    become acquainted with another language that's quite recently been
    developed. Its one that promises to greatly simplify programming. This
    new language is called C.

    Although syntactically borrowing a great deal from its predecessor
    C++, C greatly simplifies things (thus its name, which hints at its
    simpler nature by striping off the clunky double-pluses.) Its biggest
    strength is that it abandons an OOPS-style of programming. No more
    awkward "objects" or "glasses". Instead C uses what are called
    structs. Vaguely similar to a C++ "glass", a struct does away with
    anachronisms like inheritance, namespaces and the whole
    private/public/protected/friend access issues of its variables and
    routines. By freeing the programmer from the requirement to juggle all
    these issues, the coder can focus on implementing his algorithm and
    rapidly developing his application.

    While C lacks the speed and robustness of C++, I think these are petty
    issues. Given the speed of modern computers, the relative sluggishness
    of C shouldn't be an issue. Robustness and stability will occur as C
    becomes more pervasive amongst the programming community and it
    becomes more fine-tuned. Eventually C should have stability rivaling
    that of C++.

    I'm hoping to see C adopted as the de facto standard of programming.
    Based on what I've learned of this language, the future seems very
    bright indeed for C! Eventually, many years from now, perhaps we'll
    even see an operating system coded in this language.

    Thank you for your time. Your feedback is greatly appreciated.

    Egg Troll

  25. Cool by be-fan · · Score: 4, Interesting

    Modern C++ really is a cool language. Its hardly clean, and its a big beast to learn, but (IMHO) it allows a great deal of abstraction without sacrificing much (if any) performance. Personally, I'd like to see the following features in C++ 0x.

    1) Metafunctions. Like Lisp macros, they allow code-generation at compile time. They're less flexible, because they don't allow access to the AST, but they're much better than the current template-metaprogramming kludge.
    2) Lambdas. Even if we don't get true lambdas, with continuations and closures, but I'd like to see some sort of anonymous functions. The STL desperately requires it. Overall, I'd like to see more functional stuff get into the language. Unlike many of the other features discussed, lambdas and higher order functions really need language-level support to work well.
    3) Type inference. There is a proposal to allow a new use of the auto keyword like such:
    auto x = new int;
    The compiler will automatically detect that 'x' should be an int*. I've wanted this feature from the minute I saw stuff like:
    int* i = new int;
    Its so redundant! I'm surprised that Java (whose simple semantics would make type inference much easier) still makes you do stuff like:
    foo i = new foo;
    An additional motiviation is that:
    vector::iterator i = vec.begin()
    can be shortened to:
    auto i = vec.begin();
    C++ is seriously eating into the horizontal space, thanks to namespaces and nested typedefs and whatnot, and type inference would go a long way in alleviating some of that pain.

    The nice thing about these features is they keep with C++'s philosophy. Most of the complexity here is in the compiler --- there is no overhead in the generated code.

    --
    A deep unwavering belief is a sure sign you're missing something...
  26. Re:where does the name come from? by Mignon · · Score: 4, Funny
    C++98 ... C++05

    Didn't we learn anything from Y2K? How am I going to tell the difference betwen code written to the C++ 2005 standard and the C++ 1905 standard?

  27. Re:C++ == Algol++++++++++ by PetWolverine · · Score: 4, Funny

    Maybe B was still short for BCPL, and C is now short for CPL because it's not Basic any more. So next, P would would be short for PL because it's not really combined (?) any more. And finally, L would be for, well, L, because it's not really for programming any more.

    --
    I found the meaning of life the other day, but I had write-only access.
  28. Who cares? by KalvinB · · Score: 4, Informative

    The extra bloat in Visual Basic is forced into my projects wether I use it or not.

    C++ on the other hand can have all the extra stuff it wants and it doesn't affect my project. If I don't wan to use templates or whatever, I don't have to. And the compiler won't force me to include anything.

    Whining about C++ having too many features is like bitching that Baskin Robbins has too many flavors. Nobody is forcing you to buy them.

    Ben