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

DIGITP again, already

From: JONL at MIT-MC (Jon L White)
						...  It looks as 
if you are still confusing the (static) division of the alphabet 
with the (dynamic) action of the reader;  the major point that 
you've apparently missed is that a typical reader has to do something 
like the following piece of code anyhow (at least if its input radix 
is variable):
        (< VAL <input-radix>))

[It is for this very reason that I wanted to give DIGITP an optional
argument defaulting to 10.  Then (DIGITP x) corresponds to the "naive"
notion of x being a digit--namely one of the characters in the set
{0,1,2,3,4,5,6,7,8,9}--making it very easy for the novice to use this
extremely common case; while (DIGITP x IBASE) is precisely what the
reader needs.  (Actually, it would cause 8 not to be a digit in octal
radix, which is actually "a right thing" if not "the right thing", but
we are all used to abusing that--sigh.)  I don't think anyone is ever
really interested in whether a given character can EVER be a digit,
under any conceivable circumstances--but perhaps (DIGIT x ()) could
serve that purpose.  Finally, ought (DIGITP x 'ROMAN) do anything