Slashdot Mirror


New C++ Features Voted In By C++17 Standards Committee (reddit.com)

New submitter lefticus writes: The upcoming C++17 standard has reached Committee Draft stage, having been voted on in the standards committee meeting in Oulu, Finland this Saturday. This makes C++17 now feature complete, with many new interesting features such as if initializers and structured bindings having been voted in at this meeting.

An [audio] interview with the C++ committee chair, Herb Sutter, about the status of C++17 has also been posted.

9 of 286 comments (clear)

  1. Sweet by Kohath · · Score: 5, Insightful

    C++ needed more features. Some C++ books aren't even 1000 pages long.

    1. Re:Sweet by DougReed · · Score: 2, Insightful

      This made me laugh. Having written programs in most of the languages living people have heard of, Perl is the one language I can write something in and 15 minutes later can't figure out what it does! I always called Perl the perfect write only language.

      Having said that... I could write a Perl program in 5 lines that I would spend HOURS trying to figure out how to do in just about anything else. ... but if it's obscure I better add a comment to say what it is supposed to do. Because given problem 'x' I would be like 'I can do it like this' but a year later with no context it's ... 'What the hell is this supposed to do??? It's worse if it involved Perl's RegEx extensions and you don't remember what the incoming string contains. Just looking at the line makes you want to jump off of a bridge instead of trying to parse it in your head.

    2. Re:Sweet by Pseudonym · · Score: 3, Insightful

      Haskell's unofficial motto is "avoid success at all costs", which is how it has remained pure and hipster. Haskell will always be the language of the future, in the sense that unless you work for a European bank you won't be using it yourself, but the new features in your favourite language will probably come from Haskell.

      Avoiding success is a lesson that Rust has not learned.This is why Rust will become obsolete and Haskell will not.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  2. c++ is now the world's most complex language by Anonymous Coward · · Score: 4, Insightful

    I look back fondly at "c with objects". At least I could decipher the error messages.

    1. Re: c++ is now the world's most complex language by 110010001000 · · Score: 5, Insightful

      C++ is actually used in real programs for a large amount of software you use every day. Go, Swift and Rust aren't even used in the flagship products written by the organizations that created the languages. That should tell you what the difference is.

    2. Re: c++ is now the world's most complex language by gweihir · · Score: 1, Insightful

      Comparing unusable trash to unusable trash? How is that going to help? Or are you grading language quality on "hipness"?

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  3. If initializer by Carewolf · · Score: 4, Insightful

    I appreciate the idea behind if initializer. This is actually a somewhat common pattern.

    if (MyClass *p = getMyClassOrNull() {
        p->doYourThing();
    }

    But I fear using initializer statements easily gets too long for a line, and couldn't it already be done with the comma operator?

  4. You want them to rush in incomplete features?! by Anonymous Coward · · Score: 4, Insightful

    What are you trying to say? That they should rush in features that haven't been thought through? That they should put half-arsed or broken features in place just to say that they have? That they should then support these broken features for decades, since that's how long C++ projects tend to live?

    Look, if you want a language with buzzword features thrown in left and right, with changes to these features happening just about every release, then maybe a programming language like Rust is what you're looking for. C++, on the other hand, is a language meant for professionals to use when developing complex systems that won't just be used next week, but will be used 15 or 20 years from now, assuming they aren't still being used long after that. Those standardizing C++ have a huge responsibility on their shoulders. They can't goof around with C++. If a change is made to the language, it has to be thought out thoroughly and it has to be the right thing to do.

  5. Re:Is 4 errors per line typical for Rust programme by phantomfive · · Score: 1, Insightful

    "IF you trust the language to prevent you from making mistakes, you're going to have mistakes all over your code. Because no language can do that."

    --
    "First they came for the slanderers and i said nothing."