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

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.



Anonymous unions are a relatively rare feature; Rust and Haskell don't have them, for instance.




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

Search: