I think I understand the new \"value class\" feature of Scala 2.10, by comparison with Haskell\'s newtype
:
trait BoundedValue[+This] extends Any
Value classes compile as normal classes, and may well appear as references.
The magic in them is that, when the value class doesn't escape the scope, all traces of it are erased from code, effectively inlining all the code. And, of course, giving additional type safety.
See also SIP-15, which explains the mechanics.