Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: The Null Mull (or, when OO needs more O)

by elusion (Curate)
on Nov 29, 2004 at 16:31 UTC ( #410962=note: print w/ replies, xml ) Need Help??


in reply to The Null Mull (or, when OO needs more O)

I couldn't turn up any great links on the subject, but Objective-C (as used in Apple's Cocoa development) uses this pattern. Calling a method on a nil object returns nil. It'd be similar to this Perl, which would print undefined:

# this would work if it were Objective-C # using Perl's syntax my $foo = undef; my $result = $foo->message; print "undefined\n" if not defined $result;
I happen to like it.


Comment on Re: The Null Mull (or, when OO needs more O)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://410962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-29 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls