> This brings me to another "idea" I have.. although I have a feeling you guys
> have already thought of it.
>
> Instead of ...
>       $x = $a + $b + $c + $d;
> How about ...
>       $x = +«$a $b $c $d»

The closest way to what you have written is this:

  $x = 0;
  $x »+=« ($a, $b, $c, $d);

Or the slightly less attractive (IMHO) syntax invented recently:

  $x +=« ($a, $b, $c, $d);

Of course, perl6 will have a built-in reduce function as well (RFC76):

  $x = reduce {$^a + $^b} $a, $b, $c, $d;

~ John Williams


Reply via email to