Announcement

Collapse
No announcement yet.

GCC Prepares For C17 Language Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by eddie View Post

    There is a proposal to add closures to C. That would be pretty major, IMO. (They're drawing from both C++ and Objective-C as experience, I believe.)
    I agree, especially since C doesn't even have nested functions. Implementing closures would be a huge structural change to the language.

    Comment


    • #12
      Originally posted by eddie View Post

      There is a proposal to add closures to C. That would be pretty major, IMO. (They're drawing from both C++ and Objective-C as experience, I believe.)
      I haven't seen that one. I saw one for breaking multiple levels (break 2; ), and one for half floats, though they refuse to call them half due to new keywords potentially breaking old code. So either short float or _Half_float..

      Edit: And here by the way is the charter for C2x: http://www.open-std.org/jtc1/sc22/wg...docs/n2021.htm
      Last edited by carewolf; 30 October 2017, 04:00 PM.

      Comment


      • #13
        Aghh, I found the closure proposal (http://www.open-std.org/jtc1/sc22/wg...docs/n2030.pdf), it is just trying to formalize Objective-C's _Blocks, which Apple implemented in their gcc- and clang-forks in both C and C++ mode for interaction with Object-C/C++. I hope that wont go in, it is a different incompatible way of doing what C++ lambdas does. They could at least implement a subset of C++ lambdas instead, though I am not sure if that is a good idea either, as captures just requires a lot more behind the scenes magic than any other feature in C currently does.
        Last edited by carewolf; 30 October 2017, 04:30 PM.

        Comment


        • #14
          Originally posted by GdeR View Post

          As far as I know the proposal for binary literals has always been rejected. However, GCC for example does have an extension that supports it: https://gcc.gnu.org/onlinedocs/gcc/B...nary-constants
          Thanks.
          So much for a really low level language.
          C is soo low level but being allowed to write individual bits, nope!
          FYI: when programming embedded systems where some bits are toggle, status bits.
          It is extremely useful and fast to be able to compare the bit patterns with specification sheets.
          Hexadecimal can also be more error-prone in this circumstance.

          Comment


          • #15
            As an embedded programmer, nothing scares me more than people that can't convert binary to hex pretty quickly.

            Comment

            Working...
            X