3 ms·
You don't need to know category theory to use a statically typed functional language. It just happens that people interested in research languages also happens
by cardanome 3y ago
You don't need to know category theory to use a statically typed functional language. It just happens that people interested in research languages also happens to be mathematically inclined. You also don't need to be a type astronaut to use Haskell, you can write perfectly simple and pragmatic code in it.
I mean people cope with the horrible complexity of TypeScript just fine and that system doesn't even give you the benefit of being sound.
- codethief 3y ago> that system doesn't even give you the benefit of being sound I have hated parts of the TS type system with passion but this is the first time I'm hearing about unsoundness. Would you mind elaborating?
- ReleaseCandidat 3y agohttps://www.typescriptlang.org/docs/handbook/type-compatibility.html#a-note-on-soundness https://www.typescriptlang.org/docs/handbook/type-compatibil... For example: https://www.typescriptlang.org/docs/handbook/type-compatibility.html#function-parameter-bivariance https://www.typescriptlang.org/docs/handbook/type-compatibil... https://www.typescriptlang.org/docs/handbook/type-compatibility.html?#optional-parameters-and-rest-parameters https://www.typescriptlang.org/docs/handbook/type-compatibil... Or the type of an array and its elements: const arr : number[] = [1] but const this_is_actually_undefined : number = arr[456] so it should be const correct_type : number | undefined = arr[idx] And there are way more, I'm too lazy to search for them or think about them.
- codethief 3y agoAh, yes, I've stumbled about plenty of such cases – TIL that "unsoundness" is an established term for them. Thanks so much!