Re: Should $.foo attributes without "is rw" be writable from within the class

2008-09-21 Thread Daniel Ruoso
Sex, 2008-09-19 às 10:25 -0700, Jon Lang escreveu: > Daniel Ruoso wrote: > > In SMOP, it is handled based on the package of the Class, the private > > storage inside the object is something like > > $obj.^!private_storage<$!bar> > > and > > $ojb.^!private_storage<$!bar> > Note that this ought o

Are keys, values, kv, pairs, etc. named unaries?

2008-09-21 Thread Patrick R. Michaud
According to the test suite (t/spec/S29-array/kv.t), the .kv method is defined on arrays to produce an interleaved list of indices and values: my @array = ; say @array.kv.perl; # [ 0, "a", 1, "b", 2, "c", 3, "d" ] The kv.t file also shows a functional form of kv(): my @array = ;

Subroutine parameter with trait and default.

2008-09-21 Thread Michael G Schwern
I'm pondering what the proper syntax is for a subroutine parameter with both a trait and a default. That is... sub foo ($arg = 42) and sub foo ($arg is readonly) together in one parameter. Would that be sub foo ($arg = 42 is readonly) or sub foo ($arg is rea