Re: PerlHash using PMCs for keys?

2004-06-07 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Piers Cawley [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Just use a Key PMC for $P2. So, just for fun I added the following test to t/pmc/perlhash.t: new P10, .PerlHash new P1, .PerlString set P1, Bar new

Re: PerlHash using PMCs for keys?

2004-06-05 Thread TOGoS
--- Piers Cawley [EMAIL PROTECTED] wrote: new P10, .PerlHash new P1, .PerlString set P1, Bar new P2, .Key set P2, P1 Oops! should be assign! This is one of the reasons I think code like $P0 = new PerlString $P0 = foo should be illegal. If people were forced to

Re: PerlHash using PMCs for keys?

2004-06-04 Thread Piers Cawley
Leopold Toetsch [EMAIL PROTECTED] writes: Togos [EMAIL PROTECTED] wrote: Should aggregate PMCs (like PerlHash) be able to take PMCs as keys? I mean so that: $P0 = $P1[$P2] Just use a Key PMC for $P2. $P2 = new Key $P2 = key_string ... So, just for fun I added the following

Re: PerlHash using PMCs for keys?

2004-06-04 Thread Leopold Toetsch
Piers Cawley [EMAIL PROTECTED] wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Just use a Key PMC for $P2. So, just for fun I added the following test to t/pmc/perlhash.t: new P10, .PerlHash new P1, .PerlString set P1, Bar new P2, .Key set P2, P1 ^^^ Cset Px,

Re: PerlHash using PMCs for keys?

2004-05-24 Thread Leopold Toetsch
Togos [EMAIL PROTECTED] wrote: Should aggregate PMCs (like PerlHash) be able to take PMCs as keys? I mean so that: $P0 = $P1[$P2] Just use a Key PMC for $P2. $P2 = new Key $P2 = key_string ... leo

Re: PerlHash using PMCs for keys?

2004-05-21 Thread Stéphane Payrard
Le Thu, May 20, 2004 at 12:03:52PM -0700, le valeureux mongueur TOGoS a dit: Should aggregate PMCs (like PerlHash) be able to take PMCs as keys? I mean so that: $P0 = $P1[$P2] where $P1 is a PerlHash, would work. The way it works now is that it complains that you can't use a PMC as a

PerlHash using PMCs for keys?

2004-05-20 Thread TOGoS
Should aggregate PMCs (like PerlHash) be able to take PMCs as keys? I mean so that: $P0 = $P1[$P2] where $P1 is a PerlHash, would work. The way it works now is that it complains that you can't use a PMC as a key. So my compiler has to spit out about 20 lines of code for every sub-element