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

changing string-prefix character (only)?

This page is part of the web mail archives of SRFI 109 from before July 7th, 2015. The new archives for SRFI 109 contain all messages, not just those from before July 7th, 2015.

One idea I thought I'd throw out before Last Call:
While continuing to use & as an escape character,
and as the prefix character for SRFGI-108 named literals,
perhaps we could use a different character for strings?

For example, since these are quasi-literals, we could use
  `{Hello &[name]!}
instead of:
  &{Hello &[name]!}

Alternatives to backquote are regular quote ` and hash #.  I.e:
  '{Hello &[name]!}
  #{Hello &[name]!}

I haven't done a survey of implementations to see if any
of them have existing extensions starting with "`{" or
"'{" or "#{" -or for that matter "&{".

`{foo} or '{foo} might be slightly more readable and/or
prettier than &{foo}, though of course that is a matter
of taste.  It might easier or harder to notice typos.
It also reduces the overloading of "&".  One downside
is it "used up" the syntax "`{" which one might want
to mean something else.
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/