3 ms·
One of my favorite features of Scala that Java is missing is Scala's newtype-like functionality. It lets you define types which get erased to another one the JV
by johncolanduoni 10y ago
One of my favorite features of Scala that Java is missing is Scala's newtype-like functionality. It lets you define types which get erased to another one the JVM level (so there's no unnecessary boxing) but are checked in Scala and can hide their interior type and provide different methods.