Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

“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.



What 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.


> must have exactly one parameter,

Huge limitation. Not anywhere near the same thing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: