Hacker News new | ask | show | jobs
by barmic12 127 days ago
one issue is it’s not a type alias but a type encapsulation. This have a cost at runtime, it’s not like in some functionnals languages a non cost abstraction.
2 comments

Correctness is more important than runtime costs.
In languages like kotlin and rust you can have a type encapsulation like this that does not exist at runtime