develooper Front page | perl.perl6.internals | Postings from July 2002

KEY* and multidim array access thoughts

Thread Next
Scott Walters
July 16, 2002 12:38
KEY* and multidim array access thoughts
Message ID:

Still trying to solve the assembly/PMC vector interface. Accosted Dan on IRC re:
multidimentional indices. 

Looking for thoughts on this.

Working under assumptions:

* There is no assembler syntax yet, or atleast not final.
* Hardcoding KEY *'s into the assembly is the only way so far.
* Typically, an array index will be an int.
* Multidimentional indices are only useful if they can be generated 
  by executing code on the fly. The classic case of $map->[$x]->[$y]->[$z]
  comes to mind. This should collopse to $map->[$x,$y,$z] (or whatever the
  RFCs say the syntax should look like if anything).

Two suggestions were made:

* KEY * get_key() method added to PMCs.
* PMC's be accepted in place of or in addition to KEY *'s in varients taking
  multidim subscripts.

Working on a PMC representation that doesn't decompose, I'm eager to get
this feature =)



On Sun, 14 Jul 2002, Dan Sugalski wrote:

> Yup. That's why I try and be on #parrot with some regularity. (The 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About