4 ms·
You don't know of any other languages that use `mod` to represent "module"? Say, perhaps, the one you just advocated for in another thread? And there are in fa
by jordwalke 10y ago
You don't know of any other languages that use `mod` to represent "module"? Say, perhaps, the one you just advocated for in another thread?
And there are in fact issues with using x => y syntax for lambdas without a leading fun/fn keyword:
let x =
(this,
is,
a,
really,
long,
thing
) => 10;
- In that example it's not possible to tell if the leading ( is the start of a pattern for the sake of lambda, or a tuple. This happens with ES6 today as well (destructured record argument). It's not just a matter of human readability, it's a matter of building an efficient parser.
- The (x : y) syntax for type annotations is not new or weird to many people. That's the syntax used by ML, OCaml, and JS (Flow).
- We're likely going to swap some operators for string concat, so that it would be the more common ++ operator.
- The rest of the observations are good and we should address them soon.
- nikolay 10y agoI know Rust uses "mod", but Rust is consistent and predictable - it also uses "mut" unlike in Reason. Regarding ":" to denote type - I like it and it's widely used across various language, but not enforced with parentheses for typecasting.