• Nalivai@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      The first picture isn’t what people write, even though it’s technically compilable, it’s not what C is.
      The second is a normal syntax, pretty simple to understand if you write enough code.
      C is very simple language at it’s core, and it allows for it to be used in a very complicated systems.

    • db2@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      11
      ·
      10 hours ago

      Were you trying to post examples of it being easy or do you actually find those hard?

      • esa@discuss.tchncs.de
        link
        fedilink
        arrow-up
        5
        ·
        7 hours ago

        I find the C type syntax turgid. It’s fine for the most basic types, but the name-in-the-middle style doesn’t scale at all, and it’s not hard to understand why later languages separate name and type, no matter which side of the name the type goes on.

        I find Rust easier to read in that regard, even though picking <> for generics was likely done to be familiar for C++/Java types rather than easy to parse. (See also: the bastion of the turbofish)