On Wednesday 09 February 2005 17:21, Robert Seeger wrote:
> Zoran,
>
> I can buy the general logic. However, consider how much code might be
> broken by extending the same logic to:
>
>     nsv_set myarray key value
>
> How many pieces of code currently do this, and assume its global? All of
> it (that was run from a namespace) would break when it tried to access
> it from somewhere else.

I did consider this. That's why I said:

    > Admit, one should think this over for eventual traps
    > (which I didn't do 100%) but this may work.

But the:

   > or vice-versa, (does not matter for now)

does matter, of course, if you think about backward compat
(which should NOT break, this is clear).

There are several options:

a. name resolving tries local first, global second
   and takes first it finds
b. name resolving tries global first, local second
   and takes first it finds
c. name resolving tries both and throws error if
   same array found in local and global, otherwise
   takes one it finds.
d. ?

Assuming the lookup is trivial (one hash-table lookup)
I consider speed-penalty zero. Now, functionality.
To be safe and back-compat, the c. would be the better option.

Again, I'm not putting this into stone. It is just an
idea. Drill holes in it! If this holds water, one could
take a closer look. If it doesn't, well, we scrap it.

Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to