On Tue, Jun 5, 2012 at 5:51 AM, Mark Derricutt <[email protected]> wrote:

> You don't.  I've heard from several people that this is the worst thing
> about writing iOS apps, or Objective-C in general.  Silent, delayed,
> untraceable null errors.


JQuery does the same thing: selectors return arrays of matching elements,
but if no elements were found, you receive an empty array instead of null.
Anyone who thinks this is a better idea hasn't practically worked with the
concept.

Failing fast (with an NPE or, in the case above, with a Javascript error
regarding 'undefined') saves much more time than silently proceeding with
an unexpected result.

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to