[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TYPED-IDENTITY
- To: (BUG LISP) at MIT-MC
- Subject: TYPED-IDENTITY
- From: JONL at MIT-MC (Jon L White)
- Date: Sun, 12 Aug 79 10:22:00 GMT
- Cc: NIL at MIT-MC, (BUG LISPM) at MIT-MC
- Original-date: 12 AUG 1979 0622-EDT
There appears to be good reason for flushing the fsubr notion of this;
but since it makes little sense to have a changeable type argument,
how about accepting two new "numerical" subrs
FIXNUM-IDENTITY and FLONUM-IDENTITY
Thus (FIXNUM-IDENTITY (car l)) would require the interpreter to check
that "(car l)" evaluate to a fixnum, and the compiler would treat it
similarly to "(+ (car l))". The reason why the latter will no longer
be satisfactory for this purpose is that (ho! ho!) the compiler will
"optimize" this into merely "(car l)", thereby losing the type-restriction
information that comes along with "+". The need for these on the LISPM
is less urgent since there is not compilation advantage to be had, but
it would be a consistent way to get the argument type checking that
goes along with compilation.