Re:Thoughts on Rust, a few thousand lines in
by afraca on Thursday January 10, 2019 @03:49AM
(#18872468)
This is common in Haskell as well using `newtype`. You can
have type aliases like
but you can use the following function with a B:
whereas
would prevent from using f' with the wrong data. Newtype is a zero-cost abstraction.
[ Parent
| on HN ]
There are no comments on this comment yet.