Dan Sugalski wrote:
>
>@a = @b | @c;
>
> nothing short-circuits but then you don't expect it to, and that's more or
> less OK. The and operation would likely return the left-hand value if both
> are true, and xor would return whichever of the two were true, or undef of
> both (or neither)
Jeremy Howard wrote:
> >
> Of course they have reasonable meanings for arrays--element-wise operations
> (RFC 82):
>
> http://tmtowtdi.perl.org/rfc/82.html
>
> Any operation you can do on a scalar you should be able to do element-wise
> on a list, and certainly it's not hard to come up with si
Dan Sugalski wrote:
> ...would anyone object to the _binary_ operators being used
> instead? They don't have short-circuit semantics, and generally don't have
> any reasonable meanings for hashes and arrays. With that, instead of
> writing the above code, you'd write:
>
>@a = @b | @c;
>
> noth
I hate to bring this back up, but I'm designing bits of the internal api at
the moment, so this is an issue.
I'd like to have some sort of support for doing things like:
@a = @b || @c;
where @a is as big as the biggest of @b and @c, and for any individual
entry, will be the value from @b i