[M3devel] small objects
hendrik at topoi.pooq.com
hendrik at topoi.pooq.com
Tue Apr 7 14:12:17 CEST 2009
On Tue, Apr 07, 2009 at 04:55:12PM +1000, Tony Hosking wrote:
> After all of this -- I may simply be coming back around to your
> original proposal -- why not simply declare:
>
> TaggedInteger.T = REFANY;
You'd be adding a range of integers to the set of things a REFANY could
hold. Might that enable one to pass these integers as REFANYs to
existing code that isn't expecting it? Might code that checks its input
for suitable preconditions then let this case slide? Or would any test
that checks that a REFANY holds an appropriate reference or NIL
automatically manage to exclude tagged integers, just as it excludes
inappropriate references?
I don't mind the proposed semantics for REFANY -- if it had been
there from the beginning. But with a lot of existing code in existing
libraries, would it be safer to use a new type for this new meaning?
You could, of course, stull have an unsafe module that defines
TaggedInteger.T = NEWTYPEWITHNEWNAME;
-- hendrik
More information about the M3devel
mailing list