Announcement

Collapse
No announcement yet.

C++17 Is Near, A Look At The New Features

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

  • #11
    Originally posted by Steffo View Post
    Did you try QtCreator? I can only recommend it. Very fast and stable!
    That is what i use. But i msut be honest i miss MSVC even though i last used it ~5 years ago. But the MSVC compiler is trash and full of bugs.

    Comment


    • #12
      Originally posted by M@yeulC View Post
      That's one of the reasons why I started to learn Rust: most of those features are in *by design*, and it doesn't have to carry its backwards-compatibility burden.
      ...yet.

      Comment


      • #13
        Not having modules is just painful.

        Refactoring is tedious, precompiled headers is just working around the compiler. No package manager for C++, it has a lot of catching up to do. Unfortunately, there is no language closer to C++. I thought D could have been the one, but it looks like they are driving away from the C++ crowd.

        Comment


        • #14
          Originally posted by swoorup View Post
          Not having modules is just painful.

          Refactoring is tedious, precompiled headers is just working around the compiler. No package manager for C++, it has a lot of catching up to do. Unfortunately, there is no language closer to C++. I thought D could have been the one, but it looks like they are driving away from the C++ crowd.
          Linux has it much easier in a sense that you can usually provide all dependencies straight out of package manager. Good luck finding binaries and compiling on Windows from source tho, now that is a PITA. I once had to compile OpenSSL with VS 2015 and XP compatibility profile. Don't ask..
          Last edited by cen1; 06 March 2017, 12:20 PM.

          Comment


          • #15
            Originally posted by cen1 View Post

            Linux has it much easier in a sense that you can usually provide all dependencies straight out of package manager. Good luck finding binaries and compiling on Windows from source tho, now that is a PITA. I once had to compile OpenSSL with VS 2015 and XP compatibility profile. Don't ask..
            Agree, in linux it is a breeze. But when it comes to debugging in linux, it was painful.

            Comment


            • #16
              Originally posted by discordian View Post
              Dunno, but the constant nonsensical hype comparing it to 30 years old C is bugging me.
              C++ produces code that is slower than C, while Rust regularly produces code that is on par with C. By the end of the year, Rust should easily be competing against Fortran because the borrowing and ownership model allows Rust to avoid pointer aliasing by default, but this optimization is pending on the MIR compiler frontend.

              Compared to C++, Rust is able to deliver superior versions of the same features that C++ has, with less overhead, and significantly reduced chances of shooting yourself in the foot; and to do that while providing more critical features (Cargo, Rustup, Traits), and better defaults (faster vectors, move semantics, immutable by default), while heavily embracing the functional paradigm where functional programming does best. If C++ were re-created today from scratch, it would be Rust.

              In the end, you'll just end up as all other C++ programmers: fleeing from C++ to Rust because Rust offers safety, speed, and features that you could never get with C++.

              Comment


              • #17
                Originally posted by mmstick View Post

                C++ produces code that is slower than C, while Rust regularly produces code that is on par with C. By the end of the year, Rust should easily be competing against Fortran because the borrowing and ownership model allows Rust to avoid pointer aliasing by default, but this optimization is pending on the MIR compiler frontend.
                Bullshit. Everything in Rust is inspired by C++ best practices. Good C++ is as fast or slightly faster than C (due to stronger aliasing rules the compiler can use), because C++ use the concept of zero-overhead abstractions, the very same idea inspired Rust to make a modern language that could be as fast as C++ by using the same language guidelines, but starting from scratch with a modern basis and delegating the legacy stuff to foreign bindings.

                Comment


                • #18
                  Originally posted by carewolf View Post
                  Bullshit. Everything in Rust is inspired by C++ best practices. Good C++ is as fast or slightly faster than C (due to stronger aliasing rules the compiler can use), because C++ use the concept of zero-overhead abstractions, the very same idea inspired Rust to make a modern language that could be as fast as C++ by using the same language guidelines, but starting from scratch with a modern basis and delegating the legacy stuff to foreign bindings.
                  I think he means, using C++ features like virtual methods causing cache misses. I remember my C++ friends talking a bit more, but I can't think of anything else on top of my head.

                  Comment


                  • #19
                    C++ can also be slower than C when people run their compiler with "safe" optimization levels. C code can be hand optimized to compile to good machine code without high optimization levels. That's much more difficult for C++. The solution is to write good tests and go ahead and use GCC's -O3, or whatever your compiler's maximum level is.

                    C++ code needs heavy inlining and devirtualization and LTO. Performance guided optimization helps too, although that is also great with C code.

                    Comment


                    • #20
                      Originally posted by cen1 View Post

                      Linux has it much easier in a sense that you can usually provide all dependencies straight out of package manager. Good luck finding binaries and compiling on Windows from source tho, now that is a PITA. I once had to compile OpenSSL with VS 2015 and XP compatibility profile. Don't ask..
                      It doesn't seem to have gotten much press yet, but Microsoft now has an excellent package manager for precisely the sort of thing you ask for: https://blogs.msdn.microsoft.com/vcb...es-on-windows/

                      Comment

                      Working...
                      X