You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest an enhancement, if it is possible, to simplify how number literals are specified. I would like to specify 3 instead of 3u16, basically for readability.
There isn't a super straightforward way to do this, unfortunately. Syntax extensions run before the compiler knows what types things have, so there's nothing implying that the 15 in
Currently you get an invalid literal error with bare numbers. It took a while for me to figure out that you need to be more specific.
i32 is normally the default if you leave off the suffix. Is there a way to detect bare numbers and use i32?
Using u64 internally sounds like it might work great. So the macro would treat all numbers as u62 then the final compiler pass would use the actual types?
We could absolutely treat unsuffixed integers as i32, but I'd be worried that the behavior would be confusing for people used to those types "actually" being inferred.
In the u64 option, we'd basically cast all numbers up to u64 when hashing them.
I would like to suggest an enhancement, if it is possible, to simplify how number literals are specified. I would like to specify 3 instead of 3u16, basically for readability.
The text was updated successfully, but these errors were encountered: