Deprecate Keys at all.

Vasily Chekalkin bacek at bacek.com
Thu Aug 6 12:09:53 UTC 2009


Hello.

Just to bring more attention and get more opinions. I've created TT#903 
for deprecating Keys. There is copy of ticket:

----
(Background: I've spent few months trying to make Keys and Iterators 
more sane)

There is excerpt from IRC log:

<bacek> chromatic: I've got excellent (fsvo) idea. Deprecate Keys at all.
<chromatic> What would replace them?
<bacek> Create NamespaceKey which will be used for Namespaces.
<bacek> Navigating over "ordinary" aggregates will be "manual"
<chromatic> The idea has merit.
<bacek> indeed.
  No one uses $P0[foo;bar;baz]
  It's almost impossible to implement and used correctly.
  And behaviour is very dependant on HLL
<chromatic> It's not easy to manage in IMCC either.
<bacek> e.g. autovivify vs throwing exception.
  So, NamespaceKey will has-a RSA
  Simple, clean, comprehensible.
  Remove a lot of code in Hash and Array to support Keys.
  Simplify IMCC and future of PIRC (which doesn't support complex keys)
<chromatic> It's worth considering.
Actually NamespaceKey can be is-a RSA. Then creating it in pir will be 
something like

    $P0 = split ';', 'foo;bar;baz'
    $P1 = new [NamespaceKey]
    $P1 = $P0
----

-- 
Bacek


More information about the parrot-dev mailing list