Hacker News new | ask | show | jobs
by p4lindromica 4582 days ago
Yes, you can do this in scala with type aliases
2 comments

Type aliases don't solve that problem. You need to use something like Shapeless' newtype.
Type aliases do not solve this. The closest you can get is using the new value classes & those have some very big caveats