petdance/scratch — Issue #96: [RFC] Deprecate Keys at all.
Author: petdance
Created: 2011-11-01 05:29:50+00:00
State: open
Labels: core, Pri-normal, rfc, Sev-medium

Hello.

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

There is excerpt from IRC log:
{{{
chromatic: I've got excellent (fsvo) idea. Deprecate Keys at all.
What would replace them?
Create NamespaceKey which will be used for Namespaces.
Navigating over "ordinary" aggregates will be "manual"
The idea has merit.
indeed.
No one uses $P0[foo;bar;baz]
It's almost impossible to implement and used correctly.
And behaviour is very dependant on HLL
It's not easy to manage in IMCC either.
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)
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
Trac ID #903