David M. Lloyd wrote:
> $a = ($obj1, $obj2)->method;# Unclear. Calling in scalar context
> # gives no benefit, since you will
> # still have 2 return values. Maybe call
> # methods in list context
Paul Johnson wrote:
> David M. Lloyd wrote:
>
> > $obj->method; # Clearly void context.
>
> Unless it's not. For example as the last statement in a subroutine.
Right. Context means context! Just because there's no context-
inducing code on this line, doesn't mean there isn't somewhere
On Mon, Mar 26, 2001 at 10:02:40AM -0600, David M. Lloyd wrote:
> $obj->method; # Clearly void context.
Unless it's not. For example as the last statement in a subroutine.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
-- Forwarded message --
Date: Mon, 26 Mar 2001 08:16:24 -0600 (CST)
From: David M. Lloyd <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: Perl 5 Porters <[EMAIL PROTECTED]>
Subject: Re: Distributive -> and indirect slices
On Mon, 26 Mar 2001 [EMAIL PROTECTED] wrote:
>
Simon Cozens wrote:
>
> On Mon, Mar 19, 2001 at 08:30:31AM -0800, Peter Scott wrote:
> > Seen http://dev.perl.org/rfc/82.pod?
>
> I hadn't. I'm surprised it didn't give the PDL people screaming fits.
> But no, I wouldn't do it like that. It has:
>
> @b = (1,2,3);
> @c = (2,4,6);
> @d = @b *
Simon Cozens wrote:
> Better is to solve the general problem, and have all
> operators overloadable even on non-objects, so the user
> can define how this sort of thing works.
Even better is to let the user have access to the real
objects by which "non-objects", i.e. normal variables,
are impleme
On Mon, Mar 19, 2001 at 08:30:31AM -0800, Peter Scott wrote:
> Seen http://dev.perl.org/rfc/82.pod?
I hadn't. I'm surprised it didn't give the PDL people screaming fits.
But no, I wouldn't do it like that. It has:
@b = (1,2,3);
@c = (2,4,6);
@d = @b * @c; # Returns (2,8,18)
Where I would h
At 03:18 PM 3/19/01 +, Simon Cozens wrote:
>That's not really nuts. Really nuts would be suggesting that all operators
>should distribute:
>
> @a = ($foo, $bar) . $baz # @a = map { $_.$baz } ($foo, $baz)
>
>Mmmm. I could get to like that.
Seen http://dev.perl.org/rfc/82.pod?
--
Peter