Newsgroups: perl.perl6.language
From: Austin_Hasti...@Yahoo.com (Austin Hastings)
Date: Fri, 23 Apr 2004 13:33:48 -0400
Local: Fri, Apr 23 2004 1:33 pm
Subject: A12: Typed undef
Mention is made of a typed undef in A12:
<A12> I want to point out this is a pretty good idea overall, not as just some my Dog $spot; I should then be able to call class methods of Dog via $spot without further print defined($spot); # FALSE @breeds = $spot.list_breeds; This is, as pointed out, just sugar for Dog::new and Dog::list_breeds, but class C { my C $c .= ctor; # $c is defined and all is well. $c->foo->bar->baz; # If foo or bar fails, what happens? There are potentially two flavors of undef: undef undef but class = C Given that the foo and bar methods are declared to return C, should the And if so, should it be legal to have an undef invocant? A typed-undef This sort of wanders towards the question: Is undef a value, or a (The mapping of undef <-> SQL's NULL comes to mind.) =Austin You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||