3 ms·
Definitely referring to anonymous unions too. Without them, there’s still friction sometimes which makes union types unnatural. I haven’t written Java in a whi
by wayfinder 3y ago
Definitely referring to anonymous unions too. Without them, there’s still friction sometimes which makes union types unnatural.
I haven’t written Java in a while and I can’t remember if you could sometimes fake a type union using a generic type on a method, but if you can, it’s definitely super ugly and would raise eyebrows during any code review.
- logicchains 3y agoAnonymous unions are a relatively rare feature; Rust and Haskell don't have them, for instance.