From: Joe Van Dyk Date: 2005-05-05T01:21:22+09:00 Subject: Re: Typo-checking instead of static typing On 5/4/05, Jon A. Lambert wrote: > Ben Giddings wrote: > > > > Static typing tends to find typos and brainos in code before it's > > executed. > > > > My most frequent Ruby error: > "NoMethodError: undefined method `foo' for nil:NilClass" > > Not a typo, and arguably anything is a braino. > > Fixed by asking oneself two questions > 1) How in sam hill did that get set to nil? > 2) Can method bar can return nil, if blah blah foozle wimble? > That's about my most common error too (it ties with a parse error due to a missing 'end' statement).