Is there some technical reason for the Impl object inside the newtype, rather than making the methods part of the newtype object itself?
It just seems to make everything clunkier ... i.e. writing MyInt.Impl(1) rather than just MyInt(1), like a value class? Perhaps there is some other way of doing this, but it's not obvious to me.
Also, would it make sense to add an unapply to allow pattern matches, again to work like a value class?
Great lib btw. The linked articles were also an compelling read for me!
Is there some technical reason for the
Implobject inside the newtype, rather than making the methods part of the newtype object itself?It just seems to make everything clunkier ... i.e. writing
MyInt.Impl(1)rather than justMyInt(1), like a value class? Perhaps there is some other way of doing this, but it's not obvious to me.Also, would it make sense to add an
unapplyto allow pattern matches, again to work like a value class?Great lib btw. The linked articles were also an compelling read for me!