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

I think that Julia lacks a native tagged enum, which is what rust has. Unions are more akin to a local trait T that you box and implement for all the return types, which is strictly worse. If instead explicit unions were optimized to be tagged enums you could get the big performance gains of rust.

Calling code would, of course, have to destructure the return. But destructures of a return value can be very efficient using match (jump tables internally where possible).



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

Search: