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

KEY* and multidim array access thoughts

Thread Next
From:
Scott Walters
Date:
July 16, 2002 12:38
Subject:
KEY* and multidim array access thoughts
Message ID:
Pine.NEB.4.20.0207161223040.4620-100000@straylight

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 =)

Thoughts?

Thanks,
-scott


On Sun, 14 Jul 2002, Dan Sugalski wrote:

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



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About