Hacker News new | past | comments | ask | show | jobs | submit login

That depends. Value types don't support polymorphism and subclassing. More specifically, you can't have an array of a union value type like you would in C. Could case classes do without polymorphism?



Case classes as they currently stand cannot do without polymorphism. That said the Scala team doesn't show a lot of hesitancy in adding new features so I wouldn't be surprised if they implemented case value classes of some sort once the JVM supports them natively.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: