you are viewing a single comment's thread
view the rest of the comments
[–] 116 points 1 week ago (22 children)

The whole point of C++ is to graft Object Oriented Programming into C like some Frankenstein’s monster because OOP was the big hype.

C++ being performant is mostly a side effect of it being based on a language created when programs were still punched into paper cards.

  • source
  • hideshow 22 child comments
  • [–] 37 points 1 week ago (21 children)

    That was the point 20 years ago. These days it is pivoting to compile time functional programming

  • source
  • parent
  • hideshow 21 child comments
  • [–] 23 points 1 week ago (17 children)
  • [–] 28 points 1 week ago (9 children)

    If you have a constant expression like 1 + 2 in your code you can evaluate it at compile time once and avoid computing it at runtime. You can do that with control flow and much more complex language constructs in C++. If you want to know more about that look into C++ template meta programming, constexpr, and constval.

  • source
  • parent
  • hideshow 9 child comments
  • [–] 54 points 1 week ago (6 children)

    Or don't look into those things if you wish to remain sane

  • source
  • parent
  • hideshow 6 child comments
  • [–] 9 points 1 week ago (3 children)

    yeah, zig and rust have the same concepts but much better thought and structed

  • source
  • parent
  • hideshow 3 child comments
  • [–] 11 points 1 week ago (2 children)

    It's easy to build a well-designed language when you don't have to work around the mistakes of the past that were too difficult to solve then and too deeply entrenched to change now.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 1 week ago (5 children)

    it means rust is cool as fuck

  • source
  • parent
  • hideshow 5 child comments
  • [–] 2 points 1 week ago (4 children)

    aren't they talking about C++ ?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 10 points 1 week ago (2 children)

    C++ has pretty much no compile-time checks, while Rust's overengineered syntax allows it's compiler to catch vast majority of your everyday errors during compilation.

  • source
  • parent
  • hideshow 2 child comments