4 ms·
I am sure there is a way to come up with a better syntax without sacrificing the type safety aspects Well, this is the generic curly-braces-and-semicolons styl
by gaius 9y ago
I am sure there is a way to come up with a better syntax without sacrificing the type safety aspects
Well, this is the generic curly-braces-and-semicolons style. If you want to see nice clean yet type-safe syntax, just take a look at OCaml or Haskell.
- weberc2 9y agoWhat is meant by "type-safe syntax"? A syntax that permits type annotations? I will say I find Haskell and especially OCaml hard to read; I'm writing a pretty minimal language with a Haskell-esque syntax, but that's because it's easy to build a parser, not because I find it more readable. And the syntax will likely change when readability becomes more important than prototyping.
- evincarofautumn 9y agoI think the intent was “a language with nice clean syntax that is nonetheless type-safe”. A large portion of readability comes from familiarity. I find most Haskell code fairly easy to read—or at least, approximately as simple or complex syntactically as it is semantically. Other mainstream languages tend to be either much more complex syntactically than what they do semantically (“verbose”) or much simpler (“magic”).
- weberc2 9y agoThat makes sense, and I agree with your assessment of readability.
- fermienrico 9y agoWow, I just learned about Haskell syntax. I don't know the language but reading this makes me want to learn it: https://prajitr.github.io/quick-haskell-syntax/ https://prajitr.github.io/quick-haskell-syntax/ Beautiful. Absolutely beautiful.