News for hackers. Stuff that matters.
Re:The Unsound Playground: Java and Scala's Type Systems are... by danarmak on Tuesday November 29, 2016 @09:23AM (#13063164)
If they store a variant tag, that means they don't erase the bit of info that's needed for case matching. My point is that it's crucial to be able to tell at runtime to which (sub)type a value belongs. Other type information that isn't necessary for that can still be erased.
Re:The Unsound Playground: Java and Scala's Type Systems are... by wtetzner on Wednesday November 30, 2016 @01:33PM (#13073308)
I think we're in agreement, and just tripping over terminology. In most functional languages, values in a variant are just values in that variant. They don't each have their own type, which means the variant tag isn't actually type information.