* Juerd <[email protected]> [2006-12-22 17:15]:
> And if you really must use whitespace (for example, a newline
> character), you can explicitly escape it, but only if you use
> the dot-notation:
> 
>     print sqrt\
>     .(9) + 7;             # Prints 10.
> 
>     print sqrt\ .(9) + 7; # Prints 10.
> 
> This syntax is ugly and should be used in emergencies only.

Yeah wonderful. In Perl 5 I can say

    my $foo = ( Foo->new( 42 ) )
        ->set_bar( 0 )
        ->set_baz( 8 )
        ->set_quux( 15 );

Perl 6 makes me stick all those backslashes in there. I suppose
I will be making lots of use of `given`... well in those cases
where that actually helps, like the above example. For the ones
where chaining calls is actually necessary I'll have to find
other workarounds.

That's one of the reasons I hate Ruby's optional semicolon at
end-of-line; in Perl (5 and 6) I can break before the operator:

    $a = (
        $foo
        + $bar
        + $baz
        + $quux
    );

whereas Ruby makes me break afterwards:

    a = (
        foo +
        bar +
        baz +
        quux
    );

But at least it doesn't force me to vomit backslashes all over
the thing.

Mind you, I understand why Perl 6 is as it is, and this issue
won't be enough to make me stay away, I think; but that doesn't
mean I don't hate it.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to