• YⓄ乙 @aussie.zone
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    My dad wanted to me to become a developer. He bought me a computer so that I can code but instead I was introduced to the world of porn. Today I am successful Porn director who has worked for many big name companies.

    Thanks dad🥰

  • GHOSCHT@feddit.de
    link
    fedilink
    arrow-up
    11
    arrow-down
    2
    ·
    1 year ago

    Come on. C++ isn’t thaaat bad. It’s actually kind of nice to use coming from C.

    • C++20 (or even C++23 if you can find a compiler that supports it) is pretty great if you use smart pointers and concepts rather than malloc and raw templates. This is especially so if you enable all the useful warnings you can find and use a good IDE.

      Sadly, most C++ software out there was written in the 2000s and needs to be compatible with the original author’s VAX machine running Linux 2.3, so using modern compilers often becomes a challenge.

      Coming from other object oriented languages, C++ does have some weird quirks (like the way it deals with default initialisers) but none of that is impossible to learn. Sadly, it’s bogged down by decades of old, shitty C++ that it needs to support

      I suppose you could use good linting tools to ban raw pointers and enforce move()s, but honestly, I would start any new C++ project in Rust instead. Rust has its issues (especially with C++ interop), but until Carbon is ready for production use, I think it’s the best way to handle C++.

      • CoderKat@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        The most recent C++ thing I worked on (not that recent, like 5 years or so ago) was a fairly new project and the people working on it were really passionate about C++. But it was C++ code that ran as a Python library and was using the official Python C bindings. Not sure why we didn’t use one of the unofficial C++ libraries, but the usage of that C library (and such a fundamental one) held things back. We wrote was was modern C++ (at the time), but big chunks would be a completely different style.

      • float@feddit.de
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        It’s the amount of legacy it’s carrying on that drives me crazy. Many of the implicit default implementations are confusing. That’s where all these “rule of 3”, “rule of 7”, “rule of whatever” come from. The way arguments are passed into functions is another issue. From the call-side you (sometimes) cannot tell if you’ll end up with a moved value or a dangling reference. The compiler will not stop you from using it. Even if the compiler has something to tell you, it’ll do it on the most cryptic way possible. I’m grateful we have C++, it paid lots of my bills. But it’s also a pain in the ass.

    • peopleproblems@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      It’s actually kind of nice coming from C.

      I’m reading this and all I can think is “yeah, I too would rather lose a limb than let a necrotic infection spread.”

      • Kage520@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        C sucks to write and take care of memory, but it’s nice for super efficient code for use on smart watches. Samsung ditched it (tizen- native apps written in C) in favor of wearOS (java?), and their battery life is now less than half what it was.

          • frozen@lemmy.frozeninferno.xyz
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Holy hell Java on a Smartwatch?

            WearOS is based on Android, which uses Android Runtime (ART) as the application runtime. ART uses Java (or any other JVM-compatible language, such as Kotlin) as the development language, but compiles the app to native code when it’s installed on a client device.

            So… Kind of?

  • palordrolap@kbin.social
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    Caution: Finding something that one hates more than one’s self does not take away the initial self loathing. Attempting to mollify or subdue the lesser by observation or interaction with the latter may result in something greater than the sum of its parts and oh boy, Jeffery Christmas, now we’re in for a bad time.

  • ThatFembyWho@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Yeah the constant stream of critical CVEs affecting C/C++ libraries that get patched on my computer is legitimately frightening. So much low quality (and dangerous) code out there. Maybe if you have a personal project that doesn’t connect to another device… you could be justified in writing C code. Or tiny embedded systems?

    Modern C++ is actually pretty good. The language gets knocked firstly because it’s complex, and secondly a lot of people remember the old pre-C++11 days. It’s like a different language now.

    But it’s a looong way from being my favorite language. That goes something like Python… by a lot; Rust; JavaScript; C# and then everything else.

  • Zink@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I am almost a year into a job where the main piece of software is a mix of C and C++ and there is no documentation, hardly even code comments. Some of the files say they were created over a decade ago. Just pages and pages of C code with no comments and no external design docs.

    If I search my local copy of the source for .c and .cpp files, I get 1,485 items. But it’s not that bad because many files show up several times in different directories with the same name. :D

    And you know, I HAVE been feeling better about myself lately! (The job is actually a perfect fit for me, other than the humongous scary & opaque code base)