-- Not true. modern compilers do a lot of optimization long before code generation, and you really want to have for example floating point to be behaving exactly like in target language - if you collapse operations on constants such as 1.0D + 4.0. And aside from optimization, lexer - it has to distinguish single-precision and double precision floats.
However, if you do not have the target datatype you dealing with during compilation, you are destined to simulate them.
Example: ((unsigned char) 2) + ((unsigned char)255) = 1
That is in C. In ruby you'll have to manually check for overflow, and do it for each operation. You can invent classes all kind of things, but why? Use a language with types, and the check will be done for you by you Core Duo.
You keep writing that like it's a hard thing to do. It isn't. More to the point, it's a small part of the whole problem.