|
|
|
|
|
by mamcx
1599 days ago
|
|
> but I find the complexity with the type system off-putting Yeah, is it. But "complexity" is fine: Complex is better than complicated.
- [Zend of python](https://www.python.org/dev/peps/pep-0020/)
What is a big trouble is when the complexity is NOT intentionally designed (ie: in languages like oCalm, Rust, Coq...) but instead the type system is a lie that bring "complications": //A bad language, like JS, with both complexity AND complications:
[] - {}; // NaN
Humans can deal with complexity if is part of a intentional design (example: APL), but what we dread is when is accidental... |
|
The TS Compiler can atleast stop you from doing nonsense like applying operators to types where they don't make sense. Of course, it'd be better if JS just threw an error or something, but atleast TS can stop you.
[0]: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.ts(2363)