Skip to content
DevMeme
7109 of 7590
Languages Post #7794 · source on Telegram

Our Blessed C26 Versus Their Barbarous C89

Description

A Tom Gauld-style cartoon of two fortified hills facing each other across a river, each with watchtowers, flags, and a small sailboat, parodying medieval tribal warfare with C language standards. The left side is labeled 'OUR BLESSED C26' with features annotated as 'our glorious defer', 'our great _Generic', 'our noble true/false keyword', and 'our heroic nullptr'. The right side is 'THEIR BARBAROUS C89' with 'their wicked goto', 'their primitive void *', 'their backward 1/0', and 'their brutish NULL'. The meme satirizes language-standard holy wars, framing modern C (C23/C26 features like defer and nullptr) as civilization and K&R-era C89 idioms as barbarism - while both camps remain, of course, the same language separated by 37 years of committee work

Comments

30
Anonymous ★ Top Pick Two kingdoms at war, yet both ship the same UB - the only thing C standards have deprecated successfully is each other's vocabulary
  1. Anonymous ★ Top Pick

    Two kingdoms at war, yet both ship the same UB - the only thing C standards have deprecated successfully is each other's vocabulary

  2. Anonymous

    At last, `goto cleanup` has been refactored into a keyword with better public relations.

  3. @mihanizzm 5mo

    They actually added boolean without linking a lib? Or is it just named int constants?

    1. @RiedleroD 5mo

      it's in stdlib

      1. @RiedleroD 5mo

        oh actually, looks like it's a keyword since C23: https://en.cppreference.com/w/c/keyword/bool.html

        1. @RiedleroD 5mo

          sorry, I'm more familiar with C99 than the ones after

          1. _ 5mo

            To be fair C99 seemed the last version ever for a long time. It seems the new features in C26 are mostly from one person pushing for C to be improved and legacy annoyances to be fixed

            1. @RiedleroD 5mo

              well … in my case I just don't really need anything beyond C99

              1. @imfreetodowhatever 5mo

                True

              2. _ 5mo

                Nothing of that is really needed, they're mostly ergonomic improvements, same as being able to declare iteration variables within for loops in C99

                1. @RiedleroD 5mo

                  with that line of reasoning you might as well be writing in plain asm. I meant none of the newer features are useful to me personally

  4. @imfreetodowhatever 5mo

    Whatever, pinch me when C++ modules are really supported

    1. @feedable 5mo

      hopefully never

      1. @Dark_Embrace 5mo

        Why not?

        1. @feedable 5mo

          modules are a disaster from compiler standpoint: there is a whole bunch of added complexity tied to intentionally forgetting parts of the compilation state to avoid conflicts, but that means they still behave essentially like TUs, so you don't actually get much perf benefit from using them anyway

          1. @feedable 5mo

            I imagine that for c it's a non-issue, but then even proliferation of this stuff is harmful

          2. @feedable 5mo

            pch always dealt with these issues properly, with the downside that there can only be one per TU, and it has to be at the very top, because that mechanism would actually dump the entire compilation state into the file, and then import that

          3. @death_by_oom 5mo

            And header files are such a joy to use? The solution to code reuse in c++/c is objectively ass and it's purely a reminder of its age and backwards compatibility.

            1. @feedable 5mo

              well, header files are better, yes, because they allow you to just get rid of TUs entirely

        2. @imfreetodowhatever 5mo

          I mean apart from ms

    2. @Dark_Embrace 5mo

      Pinging you. They are.

  5. @yuri_kilochek 5mo

    The main feature of C is universal support. New features are only supported on new compilers, so you might as well use any other modern language.

    1. @TheFloofyFloof 5mo

      is universal support even true when undefined behavior is relied upon by many apps?

      1. @yuri_kilochek 5mo

        those that do merely aren't using this feature

  6. @kapkekes 5mo

    and no one checked that _Generic isn’t actually a «generic» in the usual sense but rather a function overload for a finite number of types (defined by the user) it’s more like @singledispatch in Python

    1. @azizhakberdiev 5mo

      void* and there you go

      1. @feedable 5mo

        no!

    2. @sysoevyarik 5mo

      Imagine actually understand C before making jokes about it 🙄

  7. @Art3m_1502 5mo

    They finally have true/false keywords, the only thing I lacked in C

  8. @tema3210 5mo

    Defer in C???

Use J and K for navigation