Leopold Toetsch wrote:

> ... it's probably simpler to just teach your compiler to use 
> integers/strings rather than PMCs.

In general, I don't think a HLL has enough information to do this.

For example, if you have an Array of Hashes, the HLL doesn't easily know
to convert to an integer for the first part of the key, and to convert
to a string for the second.

When compiling the following HLL pseudocode ...

   x = [{"1" => "one", "2" => "two"}, {"3" => "three"}]
   pmc1 = new Integer(1)
   pmc2 = new String("3")
   print x[pmc1, pmc2]

... I think the HLL has to build the key structure from the PMCs that it
has available to it, and let the aggregate complain if it gets some kind
of key that it can't cope with.

> If you really need a PMC for the key, you 
> have to create a Key PMC yourself.

That's what I'll do.

Thanks for your help!

Regards,
Roger Browne

Reply via email to