31

I love how C++ is getting better and better with every new standard. How preprocessor-hacks become less and less relevant.

Now C++ 20 is finally giving us modules, and we only had to wait 26 years longer than the Fortran guys. Well done, people. Well done.

slowclap.gif

Comments
  • 10
    consodering how absolutely massive the language is and how much fuckery had to go in from compiler hackers, I am honestly impressed
  • 2
    @AleCx04 you are right, and in a sense I do feel the same... But it still feels super silly that one of the most sophisticated programming language projects in existence took so ridiculously long to figure out this simple thing that basically all other high-level languages had to begin with.
  • 10
    @DirtEffect well yes, but consider the age in which the language was built and the use case. C++ is normally not the thing one reaches for when trying to piece together a glue script, but an actual system level programming language, and back then (as it is now) it was used for system critical tasks that required performance while maintaining the structure of an object oriented approach.

    Competition brought more tools, I would say that languages like Zig, Odin, Rust, Go and others made the C++ compiler and specification lords start to consider adding these features, considering the amount of things that C++ already had in its syntax specification arsenal this made it way more complex than the equivalent addition to a dynamic language.

    I still think that C++ is superior to the competition, I like the ideas of other languages, mainly Rust.
  • 0
    Oh god, seeing the "export" keyword gives me TypeScript PTSD.

    Also we're starting strong with syntax like "export import :part:"

    -_- something tells me Im not going to be a big fan of modules
  • 0
    @Hazarth I feel you... But at this point, I think ANYTHING is better than the include mechanism.
  • 1
    I completely agree with @AleCx04 here. I think it is a design decision to spare itself from becoming much more complex. I have read Linus torvalds' opinion about C++ and why they dont use C++ for the kernel, which seems to be popular, and he hates C++ for providing fancy stuff like classes. Really puts a whole new perspective on what certain languages are made for and what features will be considered too much.

    Also i cant even recognize C++20. I was just reading some C++ source code after long time, and was shocked to see lambdas , the spaceship operator etc. Although to be fair, i was also shocked by smart pointers which i never really learnt.
  • 2
    @purist C++ IS too much in many ways. In my opinion, the greatest strength and greatest weakness of C++ at the same time is trying to support everything at the same time.

    I mean for example the template mechanism is extremely potent, but it comes together with a profoundly fucked up type system that takes years to fully comprehend.

    In borrowing from a comparable statement on LISP, a friend of mine once said "C++ is a language where you see people spend more time thinking than coding". He meant that as a compliment for the language, its power and what not. In my opinion the statement is right, but it is the symptom of an extremely shite language, where you spend more time thinking about how to solve your problem IN THAT LANGUAGE rather then how to solve that problem.

    I see why they are not using C++ for the kernel. I have years of experience working with C++ and I would never never never use it for ANY larger project whatsoever.
Add Comment