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

The default seems to be "inferred". That is, 1 + 1i will work, but 1 + 1 is ambiguous. I've just noticed this in use, and don't know what this is officially called. I don't think this will actually be a real annoyance in practice.


It's just type inference. Rust doesn't do automatic integer coercion on arithmetic operations, so once it knows the type of any of the numbers it can deduce the types of all the rest.




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

Search: