5pl1n73r
Joined 1 year ago
Karma
43
Submissions
22
Member since
Jul 25
Joined 1 year ago
As I understand it, the primary purpose of newtypes is actually just to work around typeclass issues like in the examples mentioned at the end of the article. They are specifically designed to be zero cost, because you want to not pay when you work around the type class instance already being taken for the type you want to make an instance for. When you make an abstract data type by not exporting the data constructors, that can be done with or without newtype.
This is what happens when you use Google for recipes. And a good hint that this article does not represent the average demographic; most people outside of her's do not want room mates good reason.
> The lesson? Always test critical software under multiple compilers and library versions — especially when enabling a new language standard.
Don't have giga-complicated language jockey stuff backing software that can't afford to even have one bug.