4 ms·
I think the author misses the single biggest advantage of `identifier: Type`. The moment `Type identifier` syntax encounters higher order functions and types,
by jyounker 6y ago
I think the author misses the single biggest advantage of `identifier: Type`.
The moment `Type identifier` syntax encounters higher order functions and types, you end up with messes of parenthesis. Figuring out what a type means then involves bouncing back and forth across the type definition.
With `identifier: Type` complex higher order types still parse linearly left to right.
It's enough of a UI issue that people will end up avoiding higher order functions in `Type identifier` languages simply because they're a mess to express.
- Too 6y agoYup, especially with structural typing as in Typescript when you don't have aliases to your all your type constraints, having identifier:{complex:mess, of:{nested:stuff}} is easier than other way around.