Comment by wtetzner

Comment by wtetzner a day ago

3 replies

> Every time a language developer chooses to give their new language a novel, let alone chaotic, syntax, they sin against the very premise of software development being an engineering profession.

Exactly which syntax should every language be using then? Everyone will give you a different answer.

> Randomly chosen bolts to use left hand threads just because it suits their arbitrary whim

Claiming the syntax was chosen randomly on a whim is very much not true: https://matklad.github.io/2023/01/26/rusts-ugly-syntax.html

And there are times when it does make sense to use left-hand threads.

Just because someone looks at new syntax and doesn't immediately understand it doesn't mean that syntax doesn't exist for good reason.

Also, if your language's constructs and semantics don't exactly match those in other languages, then giving them the same syntax would be actively misleading, and therefore a design flaw.

Syntax is also only an issue for people who haven't taken the time to learn the language. If you haven't learned the language, then familiar syntax isn't going to help you anyway. You'll just think you understand something you don't.

mikkupikku 20 hours ago

It's like asking if the world should standardize on left handed or right handed screws as a default. There comes a point where the choice matters less than picking one at all.

  • dzaima 18 hours ago

    Screw handedness is something that's basically always fine either way if planned for, and with largely no benefit for either option, so standardizing that is easy enough.

    But, like, even then, there's screw drive (JIS vs phillips vs pozidriv vs a ton more) to worry about with screws. (never mind the obvious aspects of diameter & length; and whatnot else I happen to not know about)

    The significant thing I think is that such trivial impactless questions just do not exist for programming languages. Even like comment starting characters is a messy question - "//" nicely aligns with "/* */" using the slash char, but "#" is a char shorter and interpreted languages need to handle "#!" as a comment for shebangs anyways. And things only get more complicated from there.

    And, unlike with physical things, it's trivial to work with non-standardized things in software. Not like you're gonna copy-paste arbitrary code from one language into another and just expect it's gonna work anyway (else we wouldn't have more than one language).

  • wtetzner 19 hours ago

    Bit that is more like standardizing on a language, not a syntax across languages.

    I also don't think syntax is even a problem worth worrying about. It takes very little time to become accustomed to a new syntax. It's the semantics that are hard to learn. Difficulty syntax can often be helpful when learning a new language, as it serves as a reminder that the semantics are different.