|
|
|
|
|
by ossopite
54 days ago
|
|
I'm not convinced it really works well in typescript. the lack of nominal types requires you to remember some pretty hacky incantations if you want something like a newtype wrapping a primitive type my experience is that ocaml is more powerful than rust for enforcing this sort of type safety, because you have gadts that give you more expressive power, and polymorphic variants and object types (record row types) that give you more convenience. and the module system and functors of course. you also avoid some abstraction limitations/difficulties that come from the rust borrow checker for places where garbage collection is just fine |
|
Somehow, it feels like a better solution than these complicated type systems. Does any other language do this outside BEAM?