Re: Auto-creation of simple accessors (was: Perl 6 -Cheerleaders?)

2001-10-30 Thread John Siracusa
Okay, so we've got these guys auto-created if we want: method foo is lvalue { return $.foo } (plus or minus the syntax) which lets us do: $obj.foo = 5; print $obj.foo; So, what about simple array accessors? $obj.colors('red', 'green', 'blue'); $obj.colors = ('red',

Re: Auto-creation of simple accessors (was: Perl 6 - Cheerleaders?)

2001-10-30 Thread Brent Dax
John Siracusa: # Okay, so we've got these guys auto-created if we want: # # method foo is lvalue { return $.foo } # # (plus or minus the syntax) which lets us do: # # $obj.foo = 5; # print $obj.foo; # # So, what about simple array accessors? Please note that these are my best

Re: Auto-creation of simple accessors (was: Perl 6 -Cheerleaders?)

2001-10-30 Thread John Siracusa
On 10/30/01 12:13 PM, Brent Dax wrote: John Siracusa: Please note that these are my best guesses; I'm not a Damian ;^). # $obj.colors('red', 'green', 'blue'); # # $obj.colors = ('red', 'green', 'blue'); # # $obj.colors = ['red', 'green', 'blue' ]; $obj.colors=('red',