2009/11/2 Xavier Shay <xavier.s...@gmail.com>:
>
> Principle of least surprise says that $(1) and $(0) should be
> consistent. To match the nightlies, perhaps $(1) should be an empty
> jQuery object?
>

To my mind, the "principle of least surprise" suggests that jQuery
should throw an exception when passed something for which its
behaviour is undefined, like a number. It shouldn't be particularly
surprising to see an error when one starts throwing invalid input at a
function, and it means that people won't fall into the trap of finding
some undocumented and unintended behaviour and starting to rely on it.

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to