On Tue, 20 Jul 2004 16:06:40 -0700, Larry Wall <[EMAIL PROTECTED]> wrote:

Actually, I've been rethinking this whole mess since last week, and
am seriously considering cranking up the Ruby-o-meter here just a tad.
At the moment I'm inclined to say that the *only* interpolators in
double quotes are:

    \n, \t etc.
    $foo
    @foo[$i]
    %foo{$k}
    {EXPR}

where the last provides a list context to EXPR.  So all of these
would require curlies:

    {foo()}
    [EMAIL PROTECTED]
    {%foo}
    {$foo.bar}
    {Dog.wag}
    {.count}
    {~localtime}
    [EMAIL PROTECTED]
    [EMAIL PROTECTED] '.'}
    {$x.as "%10.5d"}

Note that this not only fixes the Perl 6 "% in sprintf" issue, but
also the Perl 5 "@ in email address" issue.  It also generalizes the
notion that curlies (almost) always indicate a closure everywhere.
On the other hand, it undoes my stated A12 policy that $x.foo can be
used anywhere $foo can.  On the gripping hand, it enables "{.foo}"
where we would have had a lot of "$_.foo", and I think that's an
improvement in readability, at least for people who believe in topics.

ah.. how poorly.. and how sufficient!.. But it's.. it's just not quite like in perl5.. But I can adopt myself. :) I doubt about "@arr" disabling, but {} interpolator is cool!
(hm.. looks like Perl6 will not require special HTML templating packages in 90% cases.. qq[ <tag attr={.property}> ] would be enough for me almost always)


some questions:

1) is "@a[1][2]{'a'}ÂbÂ" interpolateable? and what about "@a[1]('arg')[3]"?
2) what's the default separator for list interpolation?
"{1,2,3}" eq "123" or
"{1,2,3}" eq "1 2 3" ?
and is there any way to redefine it, as assigment to perl5 @" does? I can't figure to which object or class that property could belong, so maybe there should be just lexically scoped pragma...

Reply via email to