What do you think should be the boolean result of (> nil 1)?

Since the inequality functions only work with Numbers, and nil is not
a Number.  The only way to make that work would be to impute some
default numerical value to nil, which would probably introduce more
problems than it solved.


On Jan 14, 7:57 am, "C. Florian Ebeling" <[email protected]>
wrote:
> Hi,
>
> out of curiosity, what is the reasoning behind this behavior (I'm
> pretty sure it is intended):
>
> (= nil 1)
> => false
>
> (> nil 1) ;; NullPointerException
>
> Same behavior for >= <= etc.
>
> Florian
>
> --
> Florian Ebeling
> [email protected]
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to