scala-supertagged icon indicating copy to clipboard operation
scala-supertagged copied to clipboard

Confusion about Newtype vs NewType

Open mpurins-nc opened this issue 3 years ago • 1 comments

Hi,

First of all thanks for this library -- I really like usage without annotations (I'm a bit allergic to them :D).

I have small suggestion for improving usability a bit. Currently there are two types which can both be imported by import supertagged._ but they only differ in name by one letter change from lower case to upper case -- those are NewType and Newtype. Considering that one of them is used to create newtypes and other is not it got me confused for a bit when I typed extends Newtype[Int] and it didn't work.

I suppose simple renaming of one of them to something less confusing would work.

mpurins-nc avatar Feb 26 '21 08:02 mpurins-nc

However there is no way to compile the wrong way, I agree that it can be confusing for newcomers.

I will think about alternatives.

rudogma avatar Mar 02 '21 13:03 rudogma