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

Re: here strings and symbols




I thought about it some more...

The real issue I have in mind is the lexical syntax of <identifier> (R5RS, 7.1.1).

The background of the issue is the following: Sometimes I use
Scheme for 'rapid prototyping' in the following way---a program
that has no idea about Scheme, e.g. PostScript, externalizes
data in Scheme syntax. This data is then either read into a
Scheme program, or (and that is the tricky case) is directly
executed by a suitably primed Scheme interpreter. Now in the
latter case, it can be exremely convenient to reuse the identifiers
available in the substrate program (e.g. PostScript).

The 'reuse of identifiers' part requires that the substrate's
identifiers can be turned into Scheme identifiers (and often
also back). This usually makes me write my own escaping mechanism,
which shouldn't be necessary at all if Scheme would be more liberal
about the names of identifiers. (For the record, I prepend a tag,
e.g. "ps:", to the names to make sure they don't get in the way.)

Now for Scheme going Unicode, it would be a relief to see that
an identifier can consist of arbitary characters, if need be.
A simple quoting mechanism, e.g. |...| as in PLT, would already do
most of the job, but 'here identifiers' could finish it off.

This still doesn't mean that I am fully in favor of 'here identifiers' etc.
but I would like to see arguments for and against a liberal identifier
syntax. So far I haven't read so many in the discussion, yet.

Sebastian.