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

The big problem I see with combining the two types is that it means that a user must always consider that the values they're using may have passed through imprecise floating point arithmetic, so the == operator is always potentially problematic. If you divide the two out into separate types, then the user can use == on ints without any concern, and it better reminds people to be careful with floats.

I definitely wouldn't break it out into int, long, float, double, and unsigned variants. That would be too low level for this kind of language.



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

Search: