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

Tagged unions look simple and useful, but not very compact. As someone who has dabbled in scripting language interpreters, it be would nice to see built-in support for something like NaN-boxing if you're doing a union between pointer types, smaller integer types, and doubles. But I suppose you could it yourself like in C.


The issue with representing them more compactly is that we'd have to make the rules much more complex and we'd also have to depart from the C abi, so while this is something we might look into in the future it's not very likely to happen.




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

Search: