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

changing string-prefix character (only)?



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
backquote:
  `{Hello &[name]!}
instead of:
  &{Hello &[name]!}

Alternatives to backquote are regular quote ` and hash #.  I.e:
  '{Hello &[name]!}
or
  #{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/