Remix.run Logo
guerrilla 4 days ago

No, the data is typed; it's just not type checked.

tialaramex 4 days ago | parent [-]

I don't buy it. Go look at the Godbolt assembly output when you write software with some floating point constants on a modern CPU. The assembly has no floating point constants, because why would it, the data doesn't have a type, those constants are just emitted as integers, because they're the same thing.

The 32-bit integer 0x3f000000 is literally the same thing as the 32-bit floating point value 0.5

guerrilla 4 days ago | parent [-]

Types are not data formats.

tialaramex 4 days ago | parent [-]

Sure, but what I'm getting at is that RAX does not have a type

If we write that Quake 3 "fast" inverse square root, the machine code does not have any casting or type changes, but the C does and the Rust does, because in machine code the operations were typed but in these high level languages the values were typed.

guerrilla 2 days ago | parent [-]

Types are also not type annotations.