On Tue, 2002-04-23 at 12:48, Larry Wall wrote:
> Brent Dax writes:

> : #     \t                    also <tab>
> : #     \n                    also <lf> or <nl> (latter matching
> : logical newline)
> : #     \r                    also <cr>
> : #     \f                    also <ff>
> : #     \a                    also <bell>
> : #     \e                    also <esc>
> : 
> : I can tell you right now that these are going to screw people up.
> : They'll try to use these in normal strings and be confused when it
> : doesn't work.  And you probably won't be able to emit a warning,
> : considering how much CGI Perl munches.
> 
> I can see pragmatic variants in which those *do* interpolate by default.
> And pragmatic variants where they don't.

If you put them in one, put them in the other, HOWEVER, there's a strong
pragmatic reason for neither that i can see.

HTML/XML/SGML

I hate to say it, but if <> interpolates in everything cleanly with no
overloading, the *ML camps will thank you deeply. How often I've
written:

    qq{<foo>$content</foo>}

I cannot tell you, but it's large.

Why not use {} for this and add an {eval:code}?

> I'm just wondering how far I can drive the principle that {} is always
> a closure (even though it isn't).  I admit that it's probably overkill
> here, which is why there are question marks.

I like the idea, but I don't think it fits. On the other hand, if inside
all interpolating operators {} is the special thing that gets
interpolated (and NOTHING else), I could see liking the new look:

    qq{a${x}b}          => qq{a{$x}b}
    qr{a\Q${x}\Eb$}             => qr{a{q:$x}b$}
    qr{a${x}b$}                 => qr{a{$x}b$}
    q{a}.eval($x).q{b}  => qq{a{e:$x}b} or qq{a{{$x}}b}
    "ajs\@ajs.com"              => qq{[EMAIL PROTECTED]}
    "ajs". @{ajs} .".com"       => qq{ajs{@ajs}.com}

I know it's a departure from your original idea, but it certainly
unifies the syntax nicely:

    qq{Hello, World!{nl}}
    qr{Hello, World!{nl}}

> With respect to Perl 5, I'm trying to unhijack curlies as much as possible.

Ooops.... :-)


Reply via email to