#1053: [TODO] Allow Parrot Hashes to have PMC keys
-----------------------+----------------------------------------------------
Reporter: bacek | Owner:
Type: todo | Status: new
Priority: normal | Milestone:
Component: configure | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
-----------------------+----------------------------------------------------
Originally created at http://rt.perl.org/rt3/Ticket/Display.html?id=54236
As seen in 54220, I discovered to my chagrin that not only do Parrot
hashes have only string keys, that trying to pull the keys out as PMCs
(presumably Strings) fails.
Aside from the ugly failure, this design seems broken in the face of
languages like Perl6 that expect to be able to use non-string hash keys.
Both for direct use by Perl6 internals, and for interoperability with
other languages, it seems like at least one core Parrot hash class
should use PMC keys. These should be either readable directly as PMCs,
or stringified if assigned to a string register. (This latter case may
be optimized if the key PMC is a String, of course, but that's a
different issue).
This ticket can be considered in some sense the converse of 54220. That
ticket asks that ordinary string keys be extractable as String PMCs,
whereas this one asks that general PMC keys work, and that they
stringify if extracted as ordinary strings.
-'f
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1053>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets