From: Ken Manheimer
Subject: Re: Quoted constants in scsh (was "A Lispish Perl?")
Date: 
Message-ID: <KLM.95Nov2112803@glyph.cnri.reston.va.us>
On 2 Nov 1995, Olin Shivers wrote:

> For the Scheme Shell I borrowed a trick from LaTeX's \verb command and most
> shell's "here documents" (the <<EOF redirection mechanism for including
> constant data to be presented on a file descriptor).
> [...]
> A character-delimited here string looks like 
> 
> 	#<|"She's forgotten the \verb command, again," said James.|
> 
> The syntax is 
> 	- sharp, less than,
> 	- a delimiter character of your choice,
> 	- the string, 
> 	- the delimiter character. 
> There is absolutely no interpretation of the chars between your
> delimiters. Backslashes, double quotes, single quotes -- whatever. It's all
> just taken verbatim. The example above is *exactly* equivalent to writing

I have to say, python's triple-quote for line-spanning strings is, in my
experience, the most effective mechanism of this sort that i've used. 
Perhaps i've been following this too loosely, but it seems like it would
be suitable for the situations concerning you all.

The *only* time i encounter the need to escape characters within the
string is when i'm embedding an extended string within another, eg to
express a python code fragment which contains an extended string.  And
then it's easy to escape one of the three quotes, and the embedding is
(fairly) obvious.  I think that *not* using an arbitrary delimiter 
character is an advantage, because you don't need to see the start of the 
string to be able to see the end...

Perhaps the differences of not being a shell-command execution
environment has different, and less strenuous demands, however.

ken manheimer		ยทยทยท@cnri.reston.va.us		  (703) 620-8990 x259
	Corporation for National Research Initiatives
		1895 Preston White Drive, Suite 100
			Reston, VA 22091