Re: [perl #40178] None Must Die

2006-08-17 Thread Allison Randal
Chip Salzenberg wrote: How about a 'default' opcode that provides a value instead of null? It would work for strings and PMCs. Something like: $S0 = default hsh['key'], '' or $P0 = new .Undef ... $P1 = default hsh['key1'], $P0 $P1 = default hsh['key2'], $P0 ..

Re: [perl #40178] None Must Die

2006-08-17 Thread Leopold Toetsch
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. This ticket could be closed, but replying to rt would reopen it - please check subjects and recipients in th

Re: [perl #40178] None Must Die

2006-08-17 Thread Leopold Toetsch
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. ... and the None class is gone. As mentioned: $S0 = hsh['no_such_key'] is unchanged and returns '' and

Re: [perl #40178] None Must Die

2006-08-17 Thread Chip Salzenberg
On Fri, Aug 18, 2006 at 12:17:58AM +0200, Leopold Toetsch wrote: > A lot of src/string string_ operations are capable of dealing with NULL > strings currently [1]. *But* that's AFAIK specificied nowhere, and might just > be an accident, i.e. an extra (unneeded/unwanted) check for A NULL argument.

Re: [perl #40178] None Must Die

2006-08-17 Thread Leopold Toetsch
Am Donnerstag, 17. August 2006 21:55 schrieb Chip Salzenberg: > >     $S0 = hsh['key'] > > > > with > > > >     $S0 = hsh['key'] > >     unless null $S0 goto label > >     $S0 = '' > >   label: > > Indeed.  I think we can reduce the pain of dealing with this to the point > where you'll hardly feel

Re: [perl #40178] None Must Die

2006-08-17 Thread Leopold Toetsch
Am Donnerstag, 17. August 2006 21:50 schrieb Chip Salzenberg: > > 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

Re: [perl #40178] None Must Die

2006-08-17 Thread jerry gay
On 8/17/06, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: There might be a cognitive dissonance here with "err", since C in pasm/pir is testing for null, while C in perl6 tests for definedness. While it doesn't much matter for strings in the examples above, it might make a difference for $

Re: [perl #40178] None Must Die

2006-08-17 Thread Patrick R. Michaud
On Thu, Aug 17, 2006 at 01:11:00PM -0700, jerry gay wrote: > On 8/17/06, Chip Salzenberg <[EMAIL PROTECTED]> wrote: > > $S0 = default hsh['key'], '' > >[...] > > $P0 = new .Undef > > $P1 = default hsh['key1'], $P0 > > $P1 = default hsh['key2'], $P0 > > ... > > > >It would work w

Re: [perl #40178] None Must Die

2006-08-17 Thread Patrick R. Michaud
On Thu, Aug 17, 2006 at 12:55:54PM -0700, Chip Salzenberg wrote: > {DESIGNER ALERT - Allison, what think?} > > On Thu, Aug 17, 2006 at 12:31:11PM -0700, Patrick R. Michaud via RT wrote: > > I rely on the "return empty string" behavior. In particular, changing it > > to return NULL will mean in ma

Re: [perl #40178] None Must Die

2006-08-17 Thread jerry gay
On 8/17/06, Chip Salzenberg <[EMAIL PROTECTED]> wrote: How about a 'default' opcode that provides a value instead of null? It would work for strings and PMCs. Something like: $S0 = default hsh['key'], '' or $P0 = new .Undef ... $P1 = default hsh['key1'], $P0 $P1 = d

Re: [perl #40178] None Must Die

2006-08-17 Thread Chip Salzenberg
{DESIGNER ALERT - Allison, what think?} On Thu, Aug 17, 2006 at 12:31:11PM -0700, Patrick R. Michaud via RT wrote: > 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 > > $S

Re: [perl #40178] None Must Die

2006-08-17 Thread Chip Salzenberg
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.

Re: [perl #40178] None Must Die

2006-08-17 Thread Patrick R. Michaud
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

Re: [perl #40178] None Must Die

2006-08-17 Thread Leopold Toetsch
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. I'll do that in small steps, as there are some build and test errors. The main p

[perl #40178] None Must Die

2006-08-16 Thread via RT
# New Ticket Created by Chip Salzenberg # Please include the string: [perl #40178] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=40178 > The None class serves no useful (portable) purpose and it should be removed, especial