Kurt Stephens

Nerd Up!

Recent comments

Random image

Latest image

Syndicate

Syndicate content

Browse archives

« August 2008  
Mo Tu We Th Fr Sa Su
        1 2 3
4 5 6 7 9
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

objective-c

Ruby : Touching The Obj-C Void : nil is nil

Kurt on Sat, 2007-08-04 03:42.

A long time ago, in Objective-C on the NeXT, one could often remove nil checks, because all messages to nil would immediately return nil (or 0 depending on the caller’s method signature).

How many times have we seen this in Ruby?:

def foo
  bar && bar.baz && bar.baz.caz("x")
end

Syndicate content