5 ms·
> I just cannot take a type system seriously when workarounds like that are needed. Are you familiar with type theory and how easy it is for a type system to r
by simplify 7y ago
> I just cannot take a type system seriously when workarounds like that are needed.
Are you familiar with type theory and how easy it is for a type system to require too much work to be useful? Especially with conditional types. TypeScript has been doing a phenomenal job.
For this particular use case, since version 3.4 you can write `'x' as const` which will work no matter how large your type is.
- panpanna 7y agoSpeaking of which, is there any tutorials on type theory that targets developers instead of mathematicians?
- simplify 7y agoHindley-Milner is a solid place to start. Here's an introduction: http://akgupta.ca/blog/2013/05/14/so-you-still-dont-understand-hindley-milner/ http://akgupta.ca/blog/2013/05/14/so-you-still-dont-understa...