3 ms·
You should Newtype it though. Type aliases aren't substitute for semantics. They are for to simplify naming of complicated types.
by scalatohaskell 9y ago
You should Newtype it though. Type aliases aren't substitute for semantics. They are for to simplify naming of complicated types.
- jlouis 9y agoIn the Go world, they also serve as a way to gradually shift code around. Large code bases tend to have parts which are on transition from an "old" way to a "new" way, and type aliases allows you to maintain a backwards compatible stub type for a newly changed system. This then avoids the patch of 40k lines changed as you can gradually go to different teams and get a checkmark that the changes you made to the teams code is still going to work as expected. This is usually better coordination-wise than a 40k line patch everyone has to sign off on.