3 ms·
This would be a big improvement over how a lot of languages handle types - namely it’d let you stop calling “i16” “i32” types when they’re actually storage size
by astrange 4y ago
This would be a big improvement over how a lot of languages handle types - namely it’d let you stop calling “i16” “i32” types when they’re actually storage sizes.
“Safe” languages like Java try to achieve safety by making you write boilerplate casts here - “short = int + int” is illegal without a (short) cast even though that doesn’t change the meaning of the program.
If it was “x = i32<0,3> + i32<0,3>” then it highlights how silly this is and maybe they wouldn’t make you write a (i16<0,6>) cast.