News for hackers. Stuff that matters.
Re:What the heck is a homomorphic mapped type? by resoluteteeth on Sunday January 07, 2024 @01:59PM (#38904063)
I could be wrong, but I think it's maybe because the creators of typescript aren't that interested in actively encouraging people to use this kind of stuff as an end to itself?

Typescript's type system is extremely advanced, but it mostly only has such an advanced type system because that's the only way to support patterns that people are already using in javascript.

So for example, typescript has stuff like row polymorphism, because you may need to be able to add and remove properties to javascript objects, and row polymorphism is the only way to make that type safe, but it's not a language like purescript where the whole language is oriented around using row polymorphism for the effect system and the documentation is going to actively encourage you to use row polymorphism if you weren't already as a new pattern that you should use for your code.

The official documentation is simply going to tell you, if you try to look up how to add/remove properties in a type safe way, how you can do that within the type system.

Unfortunately I think this leads to a situation where only people who are already familiar with some of these ideas from other languages are really interested in experimenting with it, which may be a bit of a missed opportunity.

Re:What the heck is a homomorphic mapped type? by wavemode on Sunday January 07, 2024 @05:10PM (#38905679)
Even PureScript ultimately ditched the whole row-polymorphic Eff thing and now uses one big IO monad (called "Effect").

The juice ended up not being worth the squeeze, so to speak.

Re:What the heck is a homomorphic mapped type? by resoluteteeth on Sunday January 07, 2024 @06:32PM (#38906348)
Oh I didn't even know that, huh. I'm still hoping people eventually get the effect system approach to be sufficiently ergonomic for it to make it's way into more languages.