3 ms·
It's probably worth looking at how Scala implemented value types to get an idea of a likely approach: https://docs.google.com/document/d/10TQKgMiJTbVtkdRG53wsLY
by thescrewdriver 12y ago
It's probably worth looking at how Scala implemented value types to get an idea of a likely approach: https://docs.google.com/document/d/10TQKgMiJTbVtkdRG53wsLYwWM2MkhtmdV25-NZvLLMA/ https://docs.google.com/document/d/10TQKgMiJTbVtkdRG53wsLYwW...
- lmm 12y agoNot really the same thing - that only works for classes wrapping a single value, not things like the given Point example.
- frowaway001 12y agoThe point is that the proposal now is pretty much identical with what Scala people wanted in the first place. The single-field restriction is there because there are limits in how aggressive one can fight a non-cooperating runtime, not because it was their principled choice.
- hrjet 12y agoMore interesting is this: https://github.com/miniboxing/miniboxing-plugin/ https://github.com/miniboxing/miniboxing-plugin/ Their idea is, IIRC, to flatten the members of a type into an array of primitives.