• mvirts@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    6 days ago

    C+

    I highly doubt anyone would guess ANSI C is what I’m talking about if I referred to it as C+

  • Owl@mander.xyz
    link
    fedilink
    arrow-up
    16
    ·
    5 days ago

    Language

    I have job for you “language” programmers.

    Requirements; -minimum 8 years of experiences Etc…

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    6 days ago

    It’s just C++ without templates. So whatever element you want to put into std::list, it must virtually inherit std::list::value_type. And of course there will be a macro-based list monstrosity inside Boost.

  • addie@feddit.uk
    link
    fedilink
    arrow-up
    7
    ·
    5 days ago

    To be fair, compiling C code with a C++ compiler gets you all the warnings from C++'s strong-typing rules. That’s a big bonus for me, even if it only highlights the areas of your C that are likely to become a maintenance hazard - all those void* casts want some documentation about what assumptions make them safe. Clang will compile variable-length arrays in C++, so you might want to switch off that warning since you’ve probably intended it. Just means that you can’t use designated initialisers, since C++ uses constructors for that and there’s no C equivalent. I’d be happy describing code that compiles in either situation as “C+”.

    Also stops anyone using auto, constexpr or nullptr as variable names, which will help if you want to copy-paste some well-tested code into a different project later.

      • Fuck Yankies@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        5 days ago

        Well, achually, the Clang compiler along visualcode is planned to compile C++ with a borrow checker implementation.

        Also, C is imperative, C++ is object oriented, and Rust is functional programming - which is how they differer fundamentally.

        That Rust is the first one with a borrow checker doesn’t make every language (or compiler, as I “well achually” myself) that implements a borrow checker Rust.

        It just means they have implemented a borrow checker - most likely at compile time, similarly to how macros are just boilerplate code applied at compile time and that it too is a feature available in many programming languages - or compilers.

        It’s “well achually” all the way down.

        Also, I wrote all this when I realized the minus was the joke part making fun of c++ lol

        I well achually’ed myself into doing a dumb, which is usually what that does. Hopefully somebody gets something out of this.