Announcement

Collapse
No announcement yet.

The State Of C++1z In LLVM / Clang

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

  • The State Of C++1z In LLVM / Clang

    Phoronix: The State Of C++1z In LLVM / Clang

    For those curious about the state of C++11 / C++14 / C++1z features in LLVM's Clang compiler, engineers from Google and Qualcomm have a brief yet nice overview of the recent additions to the C++ programming language and the current support state within Clang...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    They should kill off C++ now that we have D

    Comment


    • #3
      Originally posted by swoorup View Post
      They should kill off C++ now that we have D
      Sadly, D is not a replacement for C++. It does not abstract direct memory management, it uses a garbage collector.

      The only potential viable replacement for C++ is Rust, but it's not mature enough. Templates are not as complete as in C++.

      Comment


      • #4
        Still no support for concepts Clang C++17 support ends up being a self-fullfilling profecy as everything they don't implement will end up being dropped from C++17 for only having one (gcc) implementation.

        Comment


        • #5
          Originally posted by gufide View Post

          Sadly, D is not a replacement for C++. It does not abstract direct memory management, it uses a garbage collector.

          The only potential viable replacement for C++ is Rust, but it's not mature enough. Templates are not as complete as in C++.
          D doesn't mandate that you use a garbage-collector, and many solutions to non-garbage-collected memory managing exist: http://wiki.dlang.org/Memory_Management.
          Plus, it only does a garbage collection when you're low on memory.
          Though some built-in features do require allocating with the GC, but you can just preallocate them.

          Comment


          • #6
            Originally posted by swoorup View Post
            They should kill off C++ now that we have D
            Who are we? The dozen or so D fanboys?

            Comment


            • #7
              Originally posted by Las_ View Post

              D doesn't mandate that you use a garbage-collector, and many solutions to non-garbage-collected memory managing exist: http://wiki.dlang.org/Memory_Management.
              Plus, it only does a garbage collection when you're low on memory.
              Though some built-in features do require allocating with the GC, but you can just preallocate them.
              Garbarge collector makes your application unpredictable. There is no way can know when you objects are destroyed. Plus, the garbage collection lock threads. These are huge no go for a language.

              From the link you sent:
              D has built-in types that may be difficult to use without the GC: exceptions, strings, dynamic arrays, associative arrays, and delegate closures.
              I'm not gonna delibaretely make basic type like this a hassle to use just by disabling the garbage collector. These types are just fine to use in c++, and extremely fast (exceptionnally with move semantics)

              What happen when you use a library that uses garbage collector?

              Strings (and Array) Copy-on-Write
              Useless with move semantics. This idom adds overhead.

              By default you have latency added to your program, and the amout and when it happens is completely unpredictable.

              According to the "Real Time" section of the article you sent to me:

              If you want performance (no random latency), you have to add @nogc to make this function suitable for real-time application.
              But then again, this function will not own any objects, so they migth be deleted anytime, and you still can't know when, ending up segfaulting your application only when the garbage collector ran during your function. I whish you happy weeks of traking down your segfaults.

              Am I false? I didn't know pretty much all of this before the link you sent to me. If I guessed wrong, please tell me why.

              If this is true, then D is definetly not a replacement for C++.

              It might be suitable for non operation-critical application though, and might be better in a case when you have less experienced programmer because D is easier. In that case go for it.

              But D is not a complete replacement of C++, so you'll see C++ around for a long, long time.
              Last edited by gufide; 05 April 2016, 01:46 PM.

              Comment


              • #8
                Originally posted by gufide View Post

                Sadly, D is not a replacement for C++. It does not abstract direct memory management, it uses a garbage collector.

                The only potential viable replacement for C++ is Rust, but it's not mature enough. Templates are not as complete as in C++.
                ​What makes you think the templates are something worth waiting? A poor man's lisp macro with horrible semantics and sucky type support. True dependent types or type classes are much better alternatives.

                Comment


                • #9
                  Originally posted by caligula View Post

                  ​What makes you think the templates are something worth waiting? A poor man's lisp macro with horrible semantics and sucky type support. True dependent types or type classes are much better alternatives.
                  Well, there is still no variadic templates and no specialization. Once this is backed into the language, I would happily say that Rust the best candidate as a safe C++ replacement. At the moment I'll continue to say that C++ as no real safe replacement.

                  Comment


                  • #10
                    Originally posted by log0 View Post

                    Who are we? The dozen or so D fanboys?
                    TBH, C++ is overly complicated language, and the fact that they keep adding more features to it (burrowing it from other languages like modules) makes it even more complicated and cryptic.

                    Why would anyone choose to start out with such a language that takes ages to get things on the ground, unless they want to make it seem like they are the only ones who know how to write in C++ and desperately prove they are some kind of elitist.

                    At this point, instead of introducing more cryptic syntax to the language they should rather look for alternatives.

                    I know there are a lot of codebases, libraries out there already written in C++. It would be better to recontruct/find an alternative language and 'interface' with their existing codebases than trying to hack on C++, which D is exactly trying to do.

                    Comment

                    Working...
                    X