Announcement

Collapse
No announcement yet.

C++20 Draft Approved As Major Update To C++ Programming Language

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

  • #51
    Originally posted by pal666 View Post
    moron, linus has improved his education and is happy c++ programmer for many years
    How tragic.
    No one is safe from Alzheimers, it seems.
    Either that, or all that decompression sickness took its toll...

    WRT to his C++ stuff, what of significance did he do ?
    I remember his git adventure, but that was C...

    Comment


    • #52
      Originally posted by pal666 View Post
      c++ copied variadic templates from rust-2030 in 2011? unlike toy languages, c++ has to be compatible with not just c, but with several decades and many billions of lines of code of c++
      Unlikely, since Rust has no templates, generics is handled by generic types and traits, while stuff like variadic templates by macros...

      The problem with C++ is that it greedily assimilates everything, and later every unit of your code has a different paradigm. C somewhat managed to maintain both compatibility and bounded cognitive complexity. With new languages, we'll see, but they generally seem to stick with their premises after some initial turbulent times.

      Comment


      • #53
        Originally posted by Brane215 View Post

        How tragic.
        No one is safe from Alzheimers, it seems.
        Either that, or all that decompression sickness took its toll...

        WRT to his C++ stuff, what of significance did he do ?
        I remember his git adventure, but that was C...
        And no thread on Phoronix is free from trolls. He wrote Subsurface a diving application for his diving hobby.

        Comment


        • #54
          Originally posted by Brane215 View Post
          Great. As Linus has pointed out, great value of C++ is to keep lure morons away from kernel crowd.
          I don't think Linus Torvalds ever worked with advanced, modern C++ (14 or later). The comment is outdated and for the current year, ignorant.

          Modern C++ is considerably more powerful than C++ 2.0/98. In particular, the template mechanism is really powerful, and would be quite helpful in a kernel environment as well.

          C OTOH has not changed at all (apart from minor stuff). You can't do generics with it. You end up with two super ugly things in large projects - cast to/from void* pointers, and switch cases on types (oftentimes you switch on types, then do a specific cast on that type). Essentially, you're not type safe anymore.

          There's talk about Rust in the kernel, and that's definitely an improvement, but things typically move really slowly in kernel land (+ Rust is a bit of an orphan project right now).

          Finally, this is hardly the first time I hear someone calling a technology crap when they don't really understand it at all.

          Comment


          • #55
            Originally posted by vladpetric View Post

            I don't think Linus Torvalds ever worked with advanced, modern C++ (14 or later). The comment is outdated and for the current year, ignorant.

            Modern C++ is considerably more powerful than C++ 2.0/98. In particular, the template mechanism is really powerful, and would be quite helpful in a kernel environment as well.

            C OTOH has not changed at all (apart from minor stuff). You can't do generics with it. You end up with two super ugly things in large projects - cast to/from void* pointers, and switch cases on types (oftentimes you switch on types, then do a specific cast on that type). Essentially, you're not type safe anymore.

            There's talk about Rust in the kernel, and that's definitely an improvement, but things typically move really slowly in kernel land (+ Rust is a bit of an orphan project right now).

            Finally, this is hardly the first time I hear someone calling a technology crap when they don't really understand it at all.
            Linus didn't have a lot of fault with the language, even then, it was the resulting heavily-abstracted jargon that he did not like. He doesn't trust programmers to emit simple, easy-to-maintain code in C++. The "everything is an object" concept is dangerous in a lot of contexts, including areas that need careful maintenance and areas that need to be performant. Things like making everything virtual is probably one of the dumber things that C++ normalized as well.

            C++ doesn't *have* to be as bad as people who use it make it out to be. I'm not even sure why but in my experience, C++ developers end up with stubborn and wild ideologies that are dangerous in a lot scenarios.

            Comment


            • #56
              Pretty sure his comments are towards C++98.

              C++98 is the stone age relative to C++20.

              Comment


              • #57
                Originally posted by computerquip View Post

                Linus didn't have a lot of fault with the language, even then, it was the resulting heavily-abstracted jargon that he did not like. He doesn't trust programmers to emit simple, easy-to-maintain code in C++. The "everything is an object" concept is dangerous in a lot of contexts, including areas that need careful maintenance and areas that need to be performant. Things like making everything virtual is probably one of the dumber things that C++ normalized as well.

                C++ doesn't *have* to be as bad as people who use it make it out to be. I'm not even sure why but in my experience, C++ developers end up with stubborn and wild ideologies that are dangerous in a lot scenarios.
                C++ doesn't enforce the OOP paradigm. You can continue to code like in C AND also take advantage of other goodies, like std::unique_ptr, std::array, std::string_view, std::span, etc which are essentially zero cost and add tremendous safety when compared to the manual/raw manipulation of C.
                You can also use C++ to enforce more type-safety than constantly casting to/from void pointers.

                About the virtual calls. IIRC in modern C++ you are nudged to use templates rather than base/virtual classes. And templates don't have the problem of virtual calls.

                Comment


                • #58
                  Originally posted by Mangix View Post
                  Pretty sure his comments are towards C++98.

                  C++98 is the stone age relative to C++20.
                  It was before he even understood the language, and made under the assumption the kernel had to use ALL C++ features. A common noob mistake.

                  Comment


                  • #59
                    Originally posted by carewolf View Post

                    It was before he even understood the language, and made under the assumption the kernel had to use ALL C++ features. A common noob mistake.
                    I mean, C++98 has no lambdas, meh algorithms, no std::array, no constexpr, and overall lacks so much stuff.

                    Writing C++98 is horrible.

                    Comment


                    • #60
                      Originally posted by Mangix View Post

                      I mean, C++98 has no lambdas, meh algorithms, no std::array, no constexpr, and overall lacks so much stuff.

                      Writing C++98 is horrible.
                      You should have seen pre-C++98 C++.. It wasn't even standardized, and you couldn't even rely on namespaces or consistently functioning templates.

                      Comment

                      Working...
                      X