Re: Distributive -> and indirect slices (fwd)

2001-03-26 Thread John Porter
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

Re: Distributive -> and indirect slices (fwd)

2001-03-26 Thread John Porter
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

Re: Distributive -> and indirect slices (fwd)

2001-03-26 Thread Paul Johnson
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

Re: Distributive -> and indirect slices (fwd)

2001-03-26 Thread David M. Lloyd
-- 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: >

Re: Distributive -> and indirect slices

2001-03-23 Thread Rick Welykochy
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 *

Re: Distributive -> and indirect slices

2001-03-23 Thread John Porter
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

Re: Distributive -> and indirect slices

2001-03-23 Thread Simon Cozens
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

Re: Distributive -> and indirect slices

2001-03-19 Thread Peter Scott
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