Announcement

Collapse
No announcement yet.

LLVM Clang 16 Defaulting To C++17 As The Default Standard

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

  • #11
    Originally posted by kpedersen View Post
    Whereas I would recommend the opposite. Use the oldest standard you can. For example LLVM's dependence on 17 is going to make it more difficult to bootstrap on aging platforms. Just to put it into context, these aging platforms will still be in use long after we have retired.
    As somebody who programs C++ since 30 years I recommend to use a new standard. std::unique_ptr for example makes ownership explicit. It was a mess with pre C++ 11 code. C++17 added std:ptional, much better than a pointer parameter with a bool to get success. std::variant is in many cases much better than inheritance. I have seen so many inheritance architectures which ended as an unmaintainable mess. In in many cases it was a fixed set, so std::variant would work too and would be even faster.

    Comment


    • #12
      Originally posted by kpedersen View Post

      When you end up with a language as widespread and critical within industry as C++ is, underlying almost every bit of software out there, then yes, you need a very disciplined standards system. Imagine if the Python 2 -> 3 fiasco happened every couple of years but also managed to take out every other language written in C++ basically.

      But yes, I do feel a lot of interns and students make a bigger deal out of standard versions than they should. Often they only want to play / learn the newer parts of the latest standard in the hope that they don't need to learn any of the rest and still remain competitive within the industry. This tends to show quite quickly in many "fresh" candidates when I interview them.

      Whereas I would recommend the opposite. Use the oldest standard you can. For example LLVM's dependence on 17 is going to make it more difficult to bootstrap on aging platforms. Just to put it into context, these aging platforms will still be in use long after we have retired.
      The aging systems thing is already a problem for PowerPC Macs, and they're not that old, compared to some systems. Granted, I think they only affect PowerPC Mac OS X, but still.

      Comment


      • #13
        Originally posted by hamishmb View Post
        The aging systems thing is already a problem for PowerPC Macs, and they're not that old, compared to some systems. Granted, I think they only affect PowerPC Mac OS X, but still.
        That's the least of anyone in this positions worries when all of the PowerPC macOS support was removed a long time ago.

        Comment


        • #14
          Originally posted by brad0 View Post

          That's the least of anyone in this positions worries when all of the PowerPC macOS support was removed a long time ago.
          Yeah of course, it's only really annoying for retro computing enthusiasts. Was just the example that came to mind.

          Comment


          • #15
            Originally posted by hamishmb View Post
            Yeah of course, it's only really annoying for retro computing enthusiasts. Was just the example that came to mind.
            I understand. Another example that had been floated but went nowhere was IRIX support. But that was a number of years ago when the LLVM codebase was building as C++11.

            Comment


            • #16
              Standards are not a mess. They are very organized. You set the standard you use in the makefile and forget about it until you decide to refactor your code with the next standard. And i agree, use the latest stable standard for your release or if private code even use the latest unstable standard. The new standards contain fixes, new paradigms that contain fixes etc. I am very happy c++ is updating because i remember it wasnt and it needed many fixes.

              Comment


              • #17
                I wonder if libc++ will finally finish implementing c++17 or if it will still be incomplete when clang-16 comes out.

                Then once upstream libc++ is feature complete for c++17, then I wonder how long it will take to land in apple clang. Hopefully no more than a year or so...

                The fact that libc++ is the only standard library on apple and android platforms means that all my projects that have to work on those platforms also are limited to c++14 and the limited subset of each subsequent standard that llvm / apple have deigned to implement.

                Comment

                Working...
                X