|
|
|
|
|
by peeters
3351 days ago
|
|
IMO this is the biggest thing available to modern languages that Java is missing. I would absolutely love to see this, particularly pattern decomposition. I wonder if you could do it without something analogous to Scala's sealed classes though--you really want your type checker to be able to assert every match has considered every branch (without having to specify a "default" everywhere). That means you need to be able to mark classes as not-dynamically-extendible, so the type checker has the full set of subtypes available. Edit: Just got to the bottom of the article. Looks like sealed hierarchies is exactly what they explore. |
|