• red_tomato@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    30 days ago

    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.

        • Sonnenblume@discuss.tchncs.de
          link
          fedilink
          arrow-up
          0
          ·
          30 days ago

          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.

              • ඞmir@lemmy.ml
                link
                fedilink
                arrow-up
                0
                ·
                29 days ago

                I get that the designers wanted to have compile time static replacement but this was not the way to do it.

  • begrudgedcarfolk@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    30 days ago

    It’s kind of sad that so many big studios have abandoned their proprietary engines to adopt unreal engine 5. What’s going to happen when Epic starts to turn the screws because they feel like they aren’t making enough money? All these big studios won’t have any staff left that knows how to build graphical engines. Honestly, at least it would make sense if they have up on their engines and started using Godot. At least they wouldn’t be bound to Epic’s bullshit.

  • lessthanluigi@lemmy.sdf.org
    link
    fedilink
    arrow-up
    1
    ·
    29 days ago

    Anon is my C language programming college professor. He was also a linux evangelist, and got me to start daily driving/dualbooting linux.

  • xep@discuss.online
    link
    fedilink
    English
    arrow-up
    1
    ·
    29 days ago

    The point of C++ isn’t optimization, rather it is that one only pays for what one uses. Experience in C++ leads to using only the features of C++ that are appropriate and conscientiously eschewing the rest.

    • Dreamcatcher@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      29 days ago

      This is why we should only use Python. :)

      So great for programming, with no downsides. Why hasn’t anyone thought of this before?

      I’m a genius, i know.