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.

12 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 Longjmp · · Score: 5, Funny

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

      I agree! And more use of the "const" keyword.
      I want to write something like
      const int const foo(const*(const) int const a) const: const {}
      and
      for (const i = 0;const i(const)++; i and finally:
      const return const 1 (const const const)

      --
      There are fewer illiterates than people who can't read.
    2. Re:Sweet by pedz · · Score: 4, Funny

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

      I agree! And more use of the "const" keyword. I want to write something like const int const foo(const*(const) int const a) const: const {} and for (const i = 0;const i(const)++; i and finally: const return const 1 (const const const)

      Replace const with spam and you would have yourself a Monty Python skit.

    3. Re:Sweet by ffkom · · Score: 4, Informative

      Just because you are unable to cope with C++'s richness of features does not mean it is a bad thing.

      After all, C++ is the one language that

      • supports a large selection of programming paradigms, and does not declare just a single one to be "the only one you need".
      • does not depend on one company or organization, but is truly a federated effort, with many compilers to choose from.
      • allows you both low-level / hardware-level programming as well as very-high-level programming just using some ready made class library / run time environment (like Qt).
      • has a responsibly acting committee doing a good job overlooking the long-term language evolution. So much unlike many other programming languages, were inexperienced people have introduced the same mistakes over and over again, because nobody was there to question them.
    4. Re:Sweet by ffkom · · Score: 5, Funny

      No Perl is for those who insist that every possible sequence of bytes shall be a valid program, because otherwise there is unnecessary redundancy in the code.

    5. Re:Sweet by Dutch+Gun · · Score: 5, Interesting

      You need to divide C++ into two sections: Stuff that's useful for applications, and stuff that's mostly relevant to library writers. A lot of the really hairy stuff is mostly for the library writers. Moreover, a lot of the complexity of C++ (and corresponding slowness of its compilers) comes from compatibility with C and with older versions of itself. If you strip away all that, the core language that most people deal with isn't quite as daunting.

      That being said, nobody is claiming that C++ isn't a difficult language to master. Scott Myers has made a career of pointing people away from it's darkest corners, after all.

      But really, C++ programming took a quantum leap forward with C++11, and C++14 just filed away some of the rough edges. It's hard to explain to non-C++ programmers what a transformation it was. I'm not expecting nearly as much with C++ 17, but I look forward to seeing if any of the proposed features will be useful in my day-to-day work.

      --
      Irony: Agile development has too much intertia to be abandoned now.
  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.

  3. Sigh by Man+On+Pink+Corner · · Score: 5, Funny

    Still no functional gonkulators. Still no encabulation templates. Still no dichroic monads or parameterized gussets. When will the C++ committee ever get around to adding modern language features that users actually want?

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

  5. They also forgot by presidenteloco · · Score: 5, Funny

    Open closures, interior decorators, and conditional consts. In protest I'm gong back to c++--

    --

    Where are we going and why are we in a handbasket?
  6. 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.