estatico / scala-newtype

NewTypes for Scala with no runtime overhead
Apache License 2.0
540 stars 31 forks source link

Add full smart constructor example in readme #40

Closed jatcwang closed 5 years ago

jatcwang commented 5 years ago

Took me a while to figure out that I need to use coerce in smart constructor implementation as it was introduced later in the readme 😅

jatcwang commented 5 years ago

@carymrobbins If you think this helps with readability please merge it :) (Trying to keep my PR list short :P)

carymrobbins commented 5 years ago

@jatcwang Nice! Good to make things more explicit. I'll bring this in tonight.