• Owl@mander.xyz
    link
    fedilink
    arrow-up
    12
    ·
    7 days ago

    Language

    I have job for you “language” programmers.

    Requirements; -minimum 8 years of experiences Etc…

  • addie
    link
    fedilink
    arrow-up
    7
    ·
    7 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.

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      7 days ago

      To be honest I’m still confused by a lot of these microcontroller languages (PlatformIO/Arduino/ESPHome)…

      Are they just drag and drop feature blocks that are essentially C macros, but you never get to see the code and its all abstracted with flow diagrams?

      • Kratzkopf@discuss.tchncs.de
        link
        fedilink
        arrow-up
        7
        ·
        7 days ago

        The standard Arduino platform is essentially C, just with some standard hardware-near procedures hidden away as far as I know. You can just write standard C code in two blocks: init and loop. Then the loop block will be repeated for ever. For controlling voltage pins you have easy commands similatlr to like pinState(PinNumber, on/off). I do not know about the others you mentioned, but there definetely is also some implementations for Raspberry Pi control by drag&drop. There is no need to limit yourself with those though.

      • DaPorkchop_@lemmy.ml
        link
        fedilink
        arrow-up
        5
        ·
        7 days ago

        I don’t know about the others, but Arduino is literally just C++ with some macros/library functions.

  • ᕙ(⇀‸↼‶)ᕗ@lemm.ee
    link
    fedilink
    arrow-up
    3
    arrow-down
    7
    ·
    7 days ago

    last time i checked turkey had erdogans brother in law ruining the countries finances, his wife take a midget mistaken for a child to kiss on the head and their foreign minister call the foreign minister of my country a dog and arresting a human rights activist stautner.

    i think it is safe to say turkey ist a really really stupid country. or to be more precise: the people living in turkey must be stupid as they not omly shit on their minorities (e.g. kurds) like normal nazis but constantly also on their own people as anyone can see from how they dont even help the victims of the last earthquake in the east.

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

    C+

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

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    7 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.