3 ms·
“Codes like a class, works like an int!” - Taken from the top of the page. This is exactly what Value Classes are in Scala. You supply an underlying value whic
by halfmatthalfcat 6y ago
“Codes like a class, works like an int!” - Taken from the top of the page.
This is exactly what Value Classes are in Scala. You supply an underlying value which is then interpreted as the value itself, not a reference.
- bcrosby95 6y ago> must have exactly one parameter, Huge limitation. Not anywhere near the same thing.
- chrisseaton 6y agoWhat you're talking about is just wrapping a single value. It's a type-system thing. What we're talking about are wrapping compound values. It's a VM implementation thing. They're not really comparable.