Re: Unary dot

2002-04-15 Thread John Siracusa
On 4/15/02 10:24 PM, Larry Wall wrote: > So the main reason that objects can function as hashes is so that the > user can poke an object into an interface expecting a hash and have it > "make sense", to the extent that the object is willing to be viewed like > that. Sure, by why should that be th

Re: vector processing in Perl6?

2002-04-15 Thread Larry Wall
Rich Morin writes: : At 5:26 PM -0700 4/13/02, Larry Wall wrote: : >Well, Perl 5 doesn't really support compact arrays of known size, and : >those are the only kind that are easy to think about when it comes to : >vectorization. : : Actually, I can think of other possibilities. For instance, are

Re: Unary dot

2002-04-15 Thread Larry Wall
[EMAIL PROTECTED] writes: : On 4/15/02 5:16 PM, Damian Conway wrote: : > if we don't support this, people will be forever having to create Perl 6 : > adapter classes just so that they can make use of legacy Perl 5 code. :-( : : Okay, how about making it a pragma that's not enabled by default? So

Re: Unary dot

2002-04-15 Thread John Siracusa
On 4/15/02 5:16 PM, Damian Conway wrote: > if we don't support this, people will be forever having to create Perl 6 > adapter classes just so that they can make use of legacy Perl 5 code. :-( Okay, how about making it a pragma that's not enabled by default? So all those Perl 5 porters can do the

Re: Unary dot

2002-04-15 Thread Damian Conway
Luke Palmer wrote: > > More interestingly, it may also be that, by default, the C (i.e. > > hash-look-up) method of a class invokes the accessor of the same name as the > > key, so that: > > I'm a tad bit confused on the grounds of classes. Are we allowed to: > %fred = new Flintstone; No. Not

Re: Unary dot

2002-04-15 Thread Damian Conway
> > $foo.{bar_attr} = 1; > > > > This would help Perl 6 support legacy Perl 5 OO code > > How? Perl 5 code doesn't use ".", and if Perl 5 code has to be changed > anyway, why not change it "all the way"? Because changing: $foo->{bar_attr} to: $foo.{bar_attr} is a generic, pu

Re: Fisher-Yates shuffle

2002-04-15 Thread abigail
On Fri, Apr 12, 2002 at 02:14:36PM -0700, Erik Steven Harrison wrote: > > -- > > On Fri, 12 Apr 2002 18:27:11 > abigail wrote: > >On Fri, Apr 12, 2002 at 04:42:07PM +0100, Piers Cawley wrote: > >> [EMAIL PROTECTED] writes: > >> > > >> > Why isn't > >> > > >> > if %foo {"key"} {print "Hel

Re: Unary dot

2002-04-15 Thread John Siracusa
On 4/15/02 1:16 AM, Damian Conway wrote: > More interestingly, it may also be that, by default, the C (i.e. > hash-look-up) method of a class invokes the accessor of the same name as the > key, so that: > > $foo.bar_attr = 1; > > could also be written: > > $foo.{bar_attr} = 1; > > and still ha

Re: Subroutine variables are like underwear

2002-04-15 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Yes, subroutine variables *are* like underwear. > But parameter names *aren't* like underwear. > Because they're not (primarily) subroutine variables. > > So they're like the labels on the knobs, dials, and buttons of your > favourite elctronic device.

Re: Unary dot

2002-04-15 Thread Luke Palmer
On Mon, 15 Apr 2002, Damian Conway wrote: > More interestingly, it may also be that, by default, the C (i.e. > hash-look-up) method of a class invokes the accessor of the same name as the > key, so that: I'm a tad bit confused on the grounds of classes. Are we allowed to: %fred = new Flintston