Announcement

Collapse
No announcement yet.

C++20 Making Progress On Modules, Memory Model Updates

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

  • C++20 Making Progress On Modules, Memory Model Updates

    Phoronix: C++20 Making Progress On Modules, Memory Model Updates

    This past week was an ISO C++ committee meeting in San Diego, which happened to be their largest meeting ever, and they managed to accomplish a lot in drafting more planned changes around the C++20 language update...

    http://www.phoronix.com/scan.php?pag...er-2018-Update

  • #2
    "- Work on C++ modules is making good progress and they hope to have it approved still for C++20. "

    this would be something really interesting. in my opinion, maintaining a c compatibility is brain dead idea that holds c++ back. whole preprocessing part should be obsoleted.

    #pragma once (or ifdef, define header protection) should be build in. modern language should not use preprocessor - end of story. I would also get rid of header files.

    Comment


    • #3
      Originally posted by michal View Post
      "- Work on C++ modules is making good progress and they hope to have it approved still for C++20. "

      this would be something really interesting. in my opinion, maintaining a c compatibility is brain dead idea that holds c++ back. whole preprocessing part should be obsoleted.

      #pragma once (or ifdef, define header protection) should be build in. modern language should not use preprocessor - end of story. I would also get rid of header files.
      Just use Go then

      Comment


      • #4
        I personally don't quite agree with the hate for header files, though I would love to see a slight change in how they're used. The separation between definition and declaration is one of the things that - to me - really makes C/C++ nice to use, as I don't have to trawl through implementation code - or use a tags system / object browser, just to learn what an application or library allows me to do.

        Properly done headers should only really need to describe the available actions one can apply onto objects - the public interface if you will. The rest should - in almost all cases - be migrated to code instead. You, as a user, should - for instance - not need to know how a work queue wraps and unwraps your tasks, or how it does thread signalling - or maybe lockless delegation - to actually run the tasks.
        A good example for this would actually be the opaque pointer design in C, where you get a pointer to an implementation-unspecified struct, so you - as the programmer using the library - don't have to worry about what happens below your code. Seeing as the library takes care of all the implementation parts for you.

        While it is possible to generate documentation from most languages that don't use this design pattern, it always feels like I'm losing some productivity every time I have to switch between code and documentation that gets displayed in different manners. Moving between an editor and a web-based documentation page for instance, or just going from text editing to trawling through an object browser in the same IDE. Working with well written C++ libraries on the other hand can be really pleasant at times, where I can just open up the header for the object I'm handling to cross reference available methods and comments, without losing my context for even a split second.

        Comment


        • #5
          What we really want is Rust without a borrow checker, I'd call it C++ 2.0

          Comment


          • #6
            Originally posted by Drago View Post

            Just use Go then
            No, Go can only compete with interpreted or VM languages.

            Comment


            • #7
              Originally posted by michal View Post
              this would be something really interesting. in my opinion, maintaining a c compatibility is brain dead idea that holds c++ back.
              Maintaining C compatibility is what has made C++ one of the most popular languages (after Java and ...C).
              When you want a high level language and don't want to write C bindings for Java, C#, Python etc... C++ is the correct choice.

              But it works both ways too, C 20 is getting features that ease compatibility with C++ such as nullptr and a certain type of new casting.

              Comment


              • #8
                Most of the proposed library additions are worthless without modules. As anyone who has actually tried to use the ranges-v3 library(which the proposal is based on) could tell you the compile times make it unusable.

                Honestly, most of the accepted proposals are just circlejerking without adding anything actually useful to end-users. Show of hands, who actually uses the execution policy feature added in C++17 that required a ridiculous amount of time and effort to get into the standard library? Hm? It better be zero because no major standard library even implements it.(1, 2)

                And to put some salt in the wound: Absolutely nothing about a builtin sum type/pattern matching, std::variant is verbose trash that is everything wrong with modern C++.

                Comment


                • #9
                  Originally posted by kpedersen View Post
                  Maintaining C compatibility is what has made C++ one of the most popular languages (after Java and ...C).
                  When you want a high level language and don't want to write C bindings for Java, C#, Python etc... C++ is the correct choice.

                  But it works both ways too, C 20 is getting features that ease compatibility with C++ such as nullptr and a certain type of new casting.
                  C compatibility has nothing to do with C++'s popularity. If you think ridding C++ of its C compatibility would make it just like Java/C#/Python, then you don't understand C++ at all.

                  Comment


                  • #10
                    Originally posted by cl333r View Post

                    No, Go can only compete with interpreted or VM languages.
                    This is true. Easy to learn, Easy to get good results - the cost is some performance which you can recover by throwing more hardware at the problem.

                    Thanksfully most of my use cases fit nicely there

                    Comment

                    Working...
                    X