On Thu, Feb 26, 2009 at 10:18 AM, Rodrigo Kumpera <[email protected]> wrote: > > Usually is enough to have a native size integer type that works with 32 bits > integers and do > implicit widening of them on 64 bits archs. This is safe since BitC doesn't > support 16bits targets.
BitC does not and will not do implicit widening. This would break the ability to do type inference. The closest we can get here is to use three-variable arithmetic type classes. One effect of that is to make arithmetic behavior imprecise. A second is to severely multiply the number of type class instances (8 integer types ^ 3 positions is 512 instances *for each arithmetic operator*). That's probably not practical. > Most 64bits targets handle mixed 32-64 bits math just fine. This is not true. It is merely that you have not had occasion to be bitten in the ass by this because you have not written critical programs. A single underspecified arithmetic operation of this form cost Ariane an entire satellite launch at one point. We have made a conscious design decision in BitC to encourage more rigorously specified integer arithmetic. Conversions are possible, but must be done explicitly. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
