Triple quoted strings

P T Withington ptw at
Thu Mar 6 03:53:28 PST 2008

On 2008-03-06, at 02:24 EST, Brendan Eich wrote:

> On Mar 5, 2008, at 11:17 PM, Nathan de Vries wrote:
>> On Thu, 2008-03-06 at 00:14 +0000, Peter Hall wrote:
>>> Except that it would have a few unexpected behaviours, especially
>>> around the & and < characters.
>> What would those unexpected behaviours be? Here document syntax is
>> available (and relatively standard) in UNIX shell, PHP, Perl & Ruby.
>> Python seems to be the only language that has strayed from the
>> traditional syntax, and I'm not entirely sure why ES4 is planning to
>> follow suite.
> I'm an old Unix hacker, I remember the Bourne Shell (source too, in C-
> gol). E4X may have given people the idea that ES4 will add even more
> (mis-)appropriated syntax but we aren't doing pipelines or command
> substitution. I don't see why we need here documents in all their
> glory, although I like and use them.
> Triple-quoted strings are simply for embedding quote and newline
> characters, verbatim and freely. If no one (including you
> Pythonistas) would find them useful then we should defer the proposal.

I'm an older Unix hacker (old enough to either remember sh before the  
invention of heredocs, or to forget that they were there from the  
beginning :P), and Lisp, and Python.

I'd like to see us keep triple-quoted strings.  But with a simpler  
(tried and true?) syntax, say that of Python 'long strings'.  (Which  
to my mind are just heredocs without a choice of delimiter.)  Seems to  
me we just tried to be too clever parsing triple-quoted strings,  
leading to all those funny edge cases that started this thread.

More information about the Es4-discuss mailing list