Martin D Kealey wrote: > I was wondering if anyone else followed the discussion in comp.std.c about > integer types, prior to the adoption of the C99 standard? There was a > substantial paper put out by Frank Farance, entitled "specification based > extended integer range" or SBEIR for short; see > http://wwwold.dkuug.dk/JTC1/SC22/WG14/docs/c9x/extended-integers/. Very interesting proposal. I wish they had adopted it. Would have saved me a lot of hassle with typedefs over the years. :-) This kind of system works well in a statically compiled language like C because the compiler can look at "signed int exact:32" and say "Oh! That's just int on this platform!" and then compile away the distinction. I'm not sure how well it would work in a dynamic environment like Parrot, where the compiler doesn't necessarily know the final actual type. It is up to the runtime engine. e.g. how would the engine rearrange the code to do "signed int exact:64" with PMC's on 32-bit platforms and I registers on 64-bit? That way lies polymorphic instruction sets and other CLI madness ... Having said that, it might be nice to have a variant on BIGINT that can be dynamically range-limited using dynamically-specified rules. Then 64-bit ints can be created as instances of RANGEBIGINT. Cheers, Rhys. P.S. I suspect one reason why it was rejected was because some programmer would ask for "signed int exact:23517" and expect it to work on every compiler. Implementing the intrinsics for something like that is *hard*.Thread Previous | Thread Next