On Thu, Aug 17, 2006 at 09:12:07PM +0200, Leopold Toetsch wrote:
> A releated change:
> 
>   $S0 = hsh['no_such_key']
> 
> used to return an empty STRING*, it'll soon return a NULL STRING*. 

Just a note (to copy from irc #parrot) -- this will cause a number
of things in PGE and perl6 to break, as I rely on the "return empty string"
behavior.  In particular, changing it to return NULL will mean
in many places that I will have to replace single-line key lookups 

    $S0 = hsh['key']

with

    $S0 = hsh['key']
    unless null $S0 goto label
    $S0 = ''
  label:


I don't mind if 

    $P0 = hsh['no_such_key']           (get_pmc_keyed)

returns NULL, but it would be nice if 

    $S0 = hsh['no_such_key']           (get_string_keyed)

could continue to return a string (''), the same way that 

    $I0 = hsh['no_such_key']           (get_int_keyed)
    $N0 = hsh['no_such_key']           (get_number_keyed)

still return ints (0) and nums (0.0).

In the meantime, I'm checking the PGE code to see how many 
lookups will actually be affected.  If it's a small number,
I'll withdraw my objection.

Pm

Reply via email to