In which situation nil is not treated as false in Clojure?

If I understand well, Clojure separates nil/false from (). In
particular, if you use next and not rest, your iteration
example will work if translated into Clojure.

empty? works in all case and is not ugly either.

For the java typing story, I think this problem is one of the cause of
the big activity of Clojure, JRuby, Groovy and the like.

I find that I write very little type annotations in Clojure, mainly on
interfaces, and never far away from a method call on that interface.
(To prevent a call to go through reflection).

In practice, it only prevents me from using the same method call for a
method of the same name in another interface.
It is not something that I often (I have no memory of any case) want
to do, even if I understand that for people coming from a Ruby/Python
background, it can be annoying.

These calls to an interface are in a first layer above the JVM and
tend to be rare in Clojure programs. (Library interface, mostly)

Best,

Nicolas.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to