A12: Typed undef

2004-04-23 Thread Austin Hastings
Mention is made of a typed undef in A12: A12 which doesn't quite work, because $spot is undefined. What probably happens is that the my cheats and puts a version of undef in there that knows it should dispatch to the Dog class if you call .self:new() on it. Anyway, we'll make it work one way or

Re: A12: Typed undef

2004-04-23 Thread Juerd
Austin Hastings skribis 2004-04-23 13:33 (-0400): I should then be able to call class methods of Dog via $spot without further initialization: print defined($spot); # FALSE $rover = $spot.new; @breeds = $spot.list_breeds; But shouldn't you then just use my Class $spot = Dog then? Or

Re: A12: Typed undef

2004-04-23 Thread Luke Palmer
Juerd writes: Austin Hastings skribis 2004-04-23 13:33 (-0400): I should then be able to call class methods of Dog via $spot without further initialization: print defined($spot); # FALSE $rover = $spot.new; @breeds = $spot.list_breeds; But shouldn't you then just use my Class

Re: A12: Typed undef

2004-04-23 Thread Simon Cozens
[EMAIL PROTECTED] (Austin Hastings) writes: A12 which doesn't quite work, because $spot is undefined. What probably happens is that the my cheats and puts a version of undef in there that knows it should dispatch to the Dog class if you call .self:new() on it. Anyway, we'll make it work one

Re: A12: Typed undef

2004-04-23 Thread Larry Wall
Interestingly, the opaque shortcut used to be $class.bless(undef, *%_); But I made it 0 instead merely because it's shorter. That does, however, free up undef as a way of asking for an explicitly undefined but blessed value. : There are potentially two flavors of undef: : : undef : :

RE: A12: Typed undef

2004-04-23 Thread Austin Hastings
-Original Message- From: Juerd [mailto:[EMAIL PROTECTED] Austin Hastings skribis 2004-04-23 13:33 (-0400): I should then be able to call class methods of Dog via $spot without further initialization: print defined($spot); # FALSE $rover = $spot.new; @breeds =

RE: A12: Typed undef

2004-04-23 Thread Austin Hastings
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Interestingly, the opaque shortcut used to be $class.bless(undef, *%_); But I made it 0 instead merely because it's shorter. That does, however, free up undef as a way of asking for an explicitly undefined but

Re: A12: Typed undef

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 02:50:42PM -0400, Austin Hastings wrote: : Sure, but You haven't provided a value yet. doesn't seem very ... : exceptional. The important thing will be You didn't provide a value at line 42, though you didn't actually try to use it till line 582. : Sure -- the class of

RE: A12: Typed undef

2004-04-23 Thread Austin Hastings
-Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] On Fri, Apr 23, 2004 at 02:50:42PM -0400, Austin Hastings wrote: : Sure, but You haven't provided a value yet. doesn't seem very ... : exceptional. The important thing will be You didn't provide a value at line 42,

Re: A12: Typed undef

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 03:18:22PM -0400, Austin Hastings wrote: : -Original Message- : From: Larry Wall [mailto:[EMAIL PROTECTED] : : On Fri, Apr 23, 2004 at 02:50:42PM -0400, Austin Hastings wrote: : : Sure, but You haven't provided a value yet. doesn't seem very ... : :

Re: A12: Typed undef

2004-04-23 Thread Dave Whipp
Larry Wall [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, Apr 23, 2004 at 02:50:42PM -0400, Austin Hastings wrote: : Sure, but You haven't provided a value yet. doesn't seem very ... : exceptional. The important thing will be You didn't provide a value at line 42, though

Re: A12: Typed undef

2004-04-23 Thread Aaron Sherman
On Fri, 2004-04-23 at 15:46, Dave Whipp wrote: Just wondering, are we going to have semantics similar to the old NaN Vs Signaling-Nan in IEEE floating point? An IEE NaN has an N-bit field where the source of the NaN can place a value representing the reason for the NaN. It can also set a flag

Re: A12: Typed undef

2004-04-23 Thread Larry Wall
On Fri, Apr 23, 2004 at 12:46:07PM -0700, Dave Whipp wrote: : I'm not sure how much of this is relevant to Cundef, but it might be nice : to have the ability to have an undef that says if used, then trap (using : the current use fail mode -- if that still exists) I suppose one could give a typed