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

Re: Consistency: #\... and (FORMAT s "~:C" c)



Someone once proposed that #\ and/or #/ should do a vanilla read if followed
by an alphabetic character. This would mean you could say #/ or #/ALTMODE to
mean the same thing. This makes a lot of sense, I think, and I'm wondering why
we never did it. We could retain #\ for compatibility, but encourage people to
change to the more uniform scheme. I was just thinking about symmetry a bit 
ago and it seems to me that the appropriate symmetry is the following:

	(DO ((I 0. (1+ I)))
	    ((= I #o200) "What a winning I\O scheme!")
	  (IF (NOT (EQUAL I (READLIST (EXPLODEN (FORMAT () "#/~:C" I)))))
	      (RETURN '"I\O isn't symmetric")))

Typing this into Maclisp (using #\ and an upper bound of 32.) dies immediately
with a diagnostic of #\DOWNARROW not being defined. I think it would be well
if #\ and FORMAT's ~:C option agreed on a set of names to be used. 

Anyone now doing something like (#/ABC) and expecting this to read as (#/A BC)
is losing, so I think this is fully upward-compatible with the existing 
implementation.

This isn't really a new proposal, just new motivation (a more coherent i/o
philosophy) for an old proposal. Any comments?

-kmp

ps Apologies in advance to those LispM types who are offended by the
   'obsolete' function EXPLODEN (is READLIST obsolete, too? how sad)
   in my example. That was the easiest way I could think of to describe
   the desired relation.