At 8:47 AM -0400 8/25/04, Butler, Gerald wrote:
It would also seem reasonable that *IF* the promotion checking requires any
significant amount of resources that there be a non-promoting version/mode of
the ops for calculations that are known a priori to not overflow (e.g.  i = 0;
i = i + 1;  <=== Should be able to be designated *somehow* to not check for
overflow)

Remember that this is just for binary PMC operations, so there's a limit to the amount of information that's available here. Skipping overflow checking means either some sort of flag or an alternate mmd slot (with a corresponding op). I think for right now we won't, though we can revisit that later if it becomes necessary.


-----Original Message-----
From: Dan Sugalski [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 8:39 AM
To: [EMAIL PROTECTED]
Subject: Tight typing by default?


It seems pretty clear that the general opinion is that operations should produce the tightest reasonable type for an operation--integer multiplication should produce an integer unless it can't, for example.

For our purposes I think the typing should go:

    platform int->float->bignum

with an operation producing a type no tighter than the loosest type
in the operation. (so int/float gives a float, float-bignum gives a
bignum)

This seem reasonable?

-- Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to