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

Re: Once again a plea for slash



I, too, assign a high benefit to changing the quoting character to not
be slash.  The problem of blocking novice users bothers me a lot; having
to double slashes in text bothers me a lot too; leaving room for
rationals is a good thing, though, as we just pointed out to one of our
users, we will probably never get to the point where implementing
rational numbers is the most important thing to be done next; Unix
pathnames could certainly be an issue for some sites in the future.

However, there are some problems in your plan.

(1) Leaving Maclisp alone and changing the LM and NIL would be a
disaster for Macsyma.  I suppose Macsyma could doctor the Maclisp
readtable before doing anything else, assuming there is some way to make
this work in the compiler.

(2) Making the / function do what you say is very unappealing.  I think
you are throwing around the word "correct" rather loosely, especially
for someone who has, in the past, been careful to distinguish between
"floating point numbers" and "real numbers".  What is the "correct"
result of (/ 1 3)?  I would prefer to let // retain its old meaning
and have / be the round-towards-negative-infinity kind of integer division
that Bill Gosper has more than adequately demonstrated is superior to
the current thing ("FORTRAN divide").

The implementation strategy for the Lisp Machine would be as follows:

To keep thing working as much and as long as possible, several
techniques can be used.  Leaving "//" as a function named "//" is a good
example of this.  Probably all occurances of the function named "/",
currently called "//", can be left as calls to the new function named
"//", and they will never have to be changed if we don't want to.  Other
than this case, we rarely use slashes in symbol names.  More often, we
use them in strings.  Where they are used to slashify slashes, it would
not hurt terribly to leave things alone; we would just get funny messages
with doubled slashes every so often, which could be fixed any time.  The
problem is where we use them to slashify double-quotes in strings; these would
have to be fixed.  There are also a few cases where backslashes are used
explicitly in strings, like user-defined format items, though these are
pretty rare.  I think the easiest thing would be to generate a transistion
system version in which both slash and backslash worked as quoting characters,
and then use this to convert everything, finally removing slash when everything
is converted.

No matter how we do it, old Maclisp programs that are not converted will
not work after the change unless they are read in on a special
readtable.  We should make such reading easy to do; I think this is a price
worth paying to get rid of making slash quote.

The real problem, of course, is that this conversion is a pain and a bunch of
work.  Someone has to do it to all the software.  Of course, we have some
pretty powerful versions of Tags Query Replace on the LM these days...