• palordrolap@kbin.social
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    9 months ago

    In some languages
    a newline does not
    necessarily indicate
    the end of a statement.

    In others, sometimes it could, but would leave things ambiguous
    as to whether the statement was ended or not.

    And so, punctuation is necessary.

    • toastal@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      But newlines + indentation are supported by a lot of languages & when it is, it’s easier to read since the prevailing convention is already to newline, then in indent. When you follow the usual coding styles or autoformatted & removed the semicolons, you’ve gained nothing for readability & added noise. I much prefer the languages that take this convention & bake it in so you don’t have to have that that visual noise—and in these languages, I never felt the parsing rules were ambiguous.