[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: here strings and symbols
This page is part of the web mail archives of SRFI 75 from before July 7th, 2015. The new archives for SRFI 75 contain all messages, not just those from before July 7th, 2015.
Mike wrote:
> > This exactly is my point: The example you
gave is awkward because the
> > 'here identifiers' you use are multi-line. With one-liners I
could
> > print the stuff like this:
> >
> > (define |+ps:foo+| (|+ps:baz+|))
>
> So is it fair to say that you don't want "here symbols"
but rather an
> alternative to | ... | for writing down identifiers?
Yes.
> It still seems to me you're doing a simple kind
of encoding, albeit a
> simple one. After all, you still need to choose a delimiter
character
> (rather than a delimiter string as with here strings) that doesn't
> appear in the identifier.
Correct, but most [all?] grammars for
identifiers I know leave some
characters out that can be chosen as
delimiter, e.g. '+', 'å' or ' '.
So in practice, you do not really inspect
the identifier at all.
> If that's the case, why is it a problem to
> simply let WRITE-on-a-string-port (as suggested by Matthew) figure
out
> the quoting for you?
Two reasons:
1. The language that needs to do the
quoting (e.g. PostScript) might not have a WRITE-on-a-string-port at all.
2. Scheme is one of those languages.
Sebastian.