On Thu, Aug 17, 2006 at 12:13:30PM -0700, Leopold Toetsch via RT wrote:
> Am Donnerstag, 17. August 2006 08:24 schrieb Chip Salzenberg:
> > The None class serves no useful (portable) purpose and it should be
> > removed, especially from the public interface of Hash.
> 
> I've started fixing that.

Yay, leo++

> The current only safe replacement is:
> 
>   $I0 = exist hsh['no_such_key']
>   ...
> 
> This can *later* be optimized to:
> 
>   $P0 = hsh['no_such_key']
>   ifnull $P0 / unless $P0 ...

So you're planning to (1) change the tests/usercode so they work with both
the old and new Hash interfaces; then (2) change Hash; then (3) re-optimize
the tests and usercode to use the isnull test?

That is the long way around, but it'll keep the users working.  Works for
me.  :-)

> A releated change:
>   $S0 = hsh['no_such_key']
> used to return an empty STRING*, it'll soon return a NULL STRING*.

Good choice.

> Folks, please check your usage of testing for existing hash keys.

Well, we (core hackers) changing the interface out from underneath them, so
if their code breaks, we should fix it up, if we can.  Code outside the svn
tree (e.g. pirate) is of course beyond our reach.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to