Re: A12: Delegation using arrays

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 03:13:09PM -0400, Austin Hastings wrote: : Can I declare a const reference and have it optimized away? : : class Queue { : has @:elements; : has $:array_delegate : handles : = \@:elements : is const; : } I suppose, depending on what you mean

RE: A12: Delegation using arrays

2004-04-23 Thread Austin Hastings
> -Original Message- > From: Larry Wall [mailto:[EMAIL PROTECTED] > > On Fri, Apr 23, 2004 at 02:07:16PM -0400, Austin Hastings wrote: > : I guess I'm more strongly attached to the sigil than I > realized. IMO, if you > : have > : > : $obj handles 'a'; > : > : and put an arrayref in $ob

Re: A12: Delegation using arrays

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 02:07:16PM -0400, Austin Hastings wrote: : I guess I'm more strongly attached to the sigil than I realized. IMO, if you : have : : $obj handles 'a'; : : and put an arrayref in $obj, then you get what's coming: iteration. But if : you have : : @obj handles 'a'; : : th

Re: A12: Delegation using arrays

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 10:39:33AM -0700, Larry Wall wrote: : On the other hand, maybe making %:handlers special is wrong, and it I meant @:handlers there, of course. We all seem to be having a little trouble with syntax today, doesn't us? Larry

RE: A12: Delegation using arrays

2004-04-23 Thread Austin Hastings
> -Original Message- > From: Larry Wall [mailto:[EMAIL PROTECTED] > > On Fri, Apr 23, 2004 at 01:15:51PM -0400, Austin Hastings wrote: > : A12 sez: > : > : If your delegation object happens to be an array: > : > : has @:handlers handles 'foo'; > : > : then something cool happens. I

Re: A12: Delegation using arrays

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 11:28:02AM -0600, Luke Palmer wrote: : Though the hash "handles" handler hardly seems useful to me. Perhaps : someone can explain what that's intended to accomplish. No idea. It just seemed like it ought to be made to mean something. On the other hand, maybe making %:han

Re: A12: Delegation using arrays

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 01:15:51PM -0400, Austin Hastings wrote: : A12 sez: : : If your delegation object happens to be an array: : : has @:handlers handles 'foo'; : : then something cool happens. In this case : Perl 6 assumes that your array contains a list of potential : handlers,

Re: A12: Delegation using arrays

2004-04-23 Thread Luke Palmer
Austin Hastings writes: > A12 sez: > > If your delegation object happens to be an array: > > has @:handlers handles 'foo'; > > then something cool happens. In this case > Perl 6 assumes that your array contains a list of potential > handlers, and you just want to call the first one

A12: Delegation using arrays

2004-04-23 Thread Austin Hastings
A12 sez: If your delegation object happens to be an array: has @:handlers handles 'foo'; then something cool happens. In this case Perl 6 assumes that your array contains a list of potential handlers, and you just want to call the first one that succeeds. This is not clear, and I