4 ms·
newtypes are strictly better. Basically 100% of the time a type alias leaks some API that's inappropriate for the intended usage of the type, and you can derive
by tadfisher 3y ago
newtypes are strictly better. Basically 100% of the time a type alias leaks some API that's inappropriate for the intended usage of the type, and you can derive newtype methods if you actually want to do that.
- whateveracct 3y agoNot strictly better. Type aliases are sometimes a nice thing to use.