On Wed, 30 Oct 2002, Austin Hastings wrote:

>
> --- Dave Storrs <[EMAIL PROTECTED]> wrote:
>
> > for @a -> $x<; @b -> $y { $x = $y[5] };
>
> Yes!!!
>
> (Except for the '<'. That's feigen-ugly.

        *shrug*  You may not like the aesthetics, but my point still
stands:  "is rw" is too long for something we're going to do fairly often.
Give me any one- or two- character marker you want that means "rw" (if
"ro" is the default) or "r" (if "rw" is the default).

> I prefer default=ro, though,
> because that let's the optimizer do more by default.)

        I don't feel strongly enough about this to argue it.  Personally,
I prioritize readablility over ease-of-optimization...I let Moore's law
take care of speed.  Other people, who work in other problem domains than
I do, may need to have other priorities.

> I proposed the multiple arrow thing a long while back, but it didn't
> work out because of precedence with comma and because of
> topicalizing/binding/etc.
>
> But that was before semicolon which can have a different precedence
> from arrow. And screw the binding -- it just looks right:
>
> for @first -> $a;
>     @pairs -> $b is rw, $c;
> {
>   print "woo-hoo!\n";
> }

        You're right, that does look good...but you had to manually insert
whitespace in to make it look good.  And (assuming that you used a TAB to
indent the '@pairs...' line), assuming that my TAB settings are the same
as yours.

        The problem is, if we make those assumptions, I can even make the
current syntax look (reasonably) good:

for @a;           @b
    -> $x is rw;  $y
{
    ....
}


--Dks

Reply via email to