From: Nikodemus S. <nik...@ra...> - 2009-01-03 16:55:21
|
On Mon, Dec 22, 2008 at 8:33 PM, Tobias C. Rittweiler <tc...@fr...> wrote: > > While pursuing to fix [Bug #310062], I encountered the following border > case I'd like to ask for your opinion: > > (read-from-string "#:(1 2 3") ==> #:|| > > (read-from-string ":(1 2 3)") ==> error > > > What's the justification for the error in the second case? I guess it's > the 5th item in [CLHS 2.3.5]. But that only applies if the "xxxxx" in > ":xxxxxx" in Figure 2-17 denotes a non-empty token which I'm not sure it > does. > > I'd be inclined to return :|| for the second case, although I can see if > people say this would be confusing. CLISP and ECL return :||, whereas > CCL signals an error for both cases. > > In either case I think #: and : should at least exhibit consistent > behaviour. My inclination would be to go with error for both: not only does justifying it on basis of CLHS seem easier, but anyone who wants to read :|| or #:|| should write so and not depend on unintended magic consequences. Cheers, -- Nikodemus |