Slashdot Mirror


A New C Standard Is On the Way

Esther Schindler writes "Last year, Danny Kalev — a former member of the C++ standards committed — explained the new features in C++. Now, in C11: A New C Standard Aiming at Safer Programming, he shares an overview of the changes in C — 13 years after the ratification of the C99 standard. Kalev describes the goodies in C11, including multi-threading support, safer standard libraries, and better compliance with other industry standards."

6 of 305 comments (clear)

  1. On the way? by TheRaven64 · · Score: 5, Informative

    It's not on the way, it was released last year. Both gcc and clang are already a good way along implementing it, and we've added a big chunk of the library support to FreeBSD libc already.

    --
    I am TheRaven on Soylent News
  2. Re:Slow Adoption of Current Standards by JustNiz · · Score: 4, Informative

    Blame Microsoft, not the standards committee.
    GCC had it ahead of time.

  3. Re:Missing features by AuMatar · · Score: 5, Informative

    C runs on way too many devices without floating point support to add those as standard libraries. It wouldn't be useful on many platforms.

    And C isn't about adding every feature in the world. The language itself is pretty much done. They're just changing libraries. They'll never add a major feature like closures, nor should they. If you want them, use another language when they're designed in well, not hacked on.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  4. Re:Slow Adoption of Current Standards by Anonymous Coward · · Score: 5, Informative

    Visual Studio added stdint.h not to comply with C, but to comply with the pending new C++ standard. Microsoft has publicly declared that they have no intention of supporting anything past C95 (basically ANSI C circa 1989 with a few tweaks).

    So some of the coolest things in C99 and C11, like named initializers, compound literals, etc, will never be in Visual Studio, because C++ has refused to adopt those features from C.

  5. Re:Slow Adoption of Current Standards by shutdown+-p+now · · Score: 5, Informative

    Visual Studio is explicitly a C++ implementation, and does not focus on C support. It has what effectively amounts to C89 support, but that's a legacy thing. Any support for C99 and C11 features is purely accidental, and usually happens when some header is required by both C99/C11 and C++11 (hence why it's just headers and never language features).

    In the meantime, other implementations, which actually care about C as well and C++ - like gcc or clang - add C11 support fairly quick.

  6. Re:Who needs threads? by Mr+Thinly+Sliced · · Score: 5, Informative

    IIRC it's because without putting explicit constraints on the memory model (needed for threading), you end up with holes of varying sizes when talking to memory from threads.

    It's mostly to do with CPU caching / memory barriers and having a consistent temporal view of data in and out.

    If it's not in the language, you end up with each platform/compiler having their own approach to barriers / atomics which makes glueing different bits of code together with different approaches a crap shoot when it comes to consistency.

    Here's a good place to start