[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small integers



    One idea I had for dealing with fixnums overflowing and either turning into
    bignums, or signaling and exception was to use the concept of retry handlers;
    there could be a pair of retry handlers, one of which would convert the 
    result to a bignum and return, the other of which would just re-raise the
    condition. The programmer could select which handler he wanted active; the
    protocol in force should be determinable statically in most cases.
    
I don't think this will work.  The fact that a function will return only a
fixnum, if it returns anything at all, must be known at compile time if you
are to generate optimal code.  Handlers are established dynamically, not
lexically, so the compiler could not be sure what policy would be in effect
when a function is called.

I don't understand your other suggestion.

-- Scott
===========================================================================
Scott E. Fahlman
School of Computer Science
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, PA 15213

Internet: sef+@cs.cmu.edu