• iopq
    link
    fedilink
    arrow-up
    26
    arrow-down
    2
    ·
    21 hours ago

    Yes, C syntax is easy understand

    • Nalivai
      link
      fedilink
      arrow-up
      3
      ·
      14 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
      link
      fedilink
      arrow-up
      5
      arrow-down
      13
      ·
      19 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
        7
        ·
        16 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)

      • iopq
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        15 hours ago

        This is why you don’t write C, after a while this looks normal and sane