Leopold Toetsch <[EMAIL PROTECTED]> writes:

> Dan Sugalski <[EMAIL PROTECTED]> wrote:
>> And semantic differences--don't forget those.
>
> A keyed "add" vtable doesn't help to provide more semantics. The set vs
> assign thread applies here too. On the contrary: to provide all
> semantics you would need "add_set_p_k_p_k_p_k" and "add_assign_p_k_p_k_p_k"
> and possibly "add_clone_p_k_p_k_p_k".

If I'm on target, what Dan's trying to avoid is having to create
magic proxy objects for autovivification.  If this is all we want out
of keyed ops, then we can get it more cheaply by only adding keyed
variants for the _out_ parameters of each op.  That way the standard
get_*_keyed ops can either return NULL, return a new PMC without
insertion, or insert and return a new PMC for read parameters, while
the *_pk_*_* ops can do "the right thing" with respect to
autovivification.  No temporary keys or null keys need be created.

I think this covers the semantics.  Beyond that, it's just a matter
of performance -- extra opcodes vs. extra ops -- that we can fight
out in the benchmark arena.

/s

Reply via email to