Jeremy Howard writes:
> Note that RFC 82 (http://tmtowtdi.perl.org/rfc/82.pod) proposes that _all_
> operators behave the same way in a list context. To me, this consistancy
> would be a real win.

I don't know.  Perl has been all for breaking consistency when it made
the programmer's life easier, and || is definitely one of those cases.

The RFC would break:
  $num_stories = @characters * @plots;  # scalar context
in favour of:
  @totals      = @raw * @weights;       # implicit loop

Right now, Perl's logops *are* consistent when applied to arrays.
They're consistent with respect to the rule that they give scalar
context to their operands (left-operand only with the boolean ops).

I like the idea of adding the context-aware operators, but I don't
think I'd use them as often as I use "the number of things in the
array".  I think most Perl programmers would be in the same camp.
Unless you can show a couple of cool things that this makes possible,
that is.

So I'd say: option, yes.  Default, no.

Nat

Reply via email to