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

Re: [Scheme-reports] Symbol escapes - clarification



On Tue, Jan 10, 2012 at 12:53:44PM +0200, Jussi Piitulainen wrote:
> > Don't forget that string->symbol exists, and if it doesn't live by
> > the same restrictions, will be capable of generating symbols that
> > can't be represented with WRITE. And if it does live by those
> > restrictions, it'll be faintly annoying that strings and symbols
> > aren't symmetrical.
> 
> Such symmetry could be had on the cheap by building the escape syntax
> for symbols directly on string syntax, say #"102" instead of |102|.
> 
> Just a thought.

Let's not invent new things.  The report is supposed to represent current
practice and not invent new things.  I don't know of any existing Scheme
that uses this syntax.

> > The text on identifiers in 2.1 says that . is not an identifier; does
> > that mean I *cannot* write (define |.| 123) and then (+ |.| 456)?
> 
> I think it only means that you cannot write (define . 123) but must
> write (define |.| 123) instead.

Actually, I think (define |.| 123) (+ |.| 456) is correct.  Why would define
be treated differently (and the reader doesn't know it's a define, either).

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports