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

Proposed definition of SUBST

    Date: Saturday, 4 September 1982  01:02-EDT
    From: Scott E. Fahlman <Fahlman at Cmu-20c>

    Maybe the right move is to eliminate the :TEST-NOT option for SUBST.
    All you really want here is some sort of equality test, so :TEST-NOT
    makes no real sense here.  Don't we have some precedents for this?...
Why not just flush all :TEST-NOTs and make a primitive COMPLEMENT as:


a smart compiler could generate fairly good code for this and in some
cases literal translations from things like (COMPLEMENT #'EQ) to #'NEQ could
be done, etc. I suspect the constant argument case will occur very often
so this optimization will be a very productive one. Then people would just
write :TEST (COMPLEMENT #'EQ) if it mattered to them to have the opposite 

T (Yale Scheme) has this. It's much more general than :TEST-NOT (has 
many more uses), simplifies the internal code of many system functions, 
and simplifies the language definition.