Again, (Boolean. false) is an object. Objects returned from Java are values
from Clojure's perspective like numbers, ....

Clojure is a Lisp but allows you to access Java's object world.
It's not because the object wraps a property containing a boolean primitive 
value that it
 should behave the same as Clojure's boolean type.

Other classes may wrap a primitive boolean value in a property and you would not
like these to be converted to a Clojure boolean value, you would like to retain 
a handle
on the object. Why should Boolean objects be different ? They are a Java 
creation,
they have nothing to do with the type value system of Clojure.

Luc


> 
> 
> > Hope I've made my point clear now.
> >
> 
> Maybe helping here... 
> 
> To anyone with some understanding of programming and a basic understanding 
> how `if' looks like in lisps the following lines would be at least 
> astonishing
> 
>  user=> (if some-thing "then" "else")
>  "then"
>  user=> (if (= some-thing false) "then" "else")
>  "then"
> 
> How can some-thing evaluate to true but be equal (in whatever sense = 
> defines equality) to false?  
> 
> IMHO it looks like some inconsistency in the contract between truthiness 
> and equality.
> 
> (And yes, I understand the argument that (Boolean. false) is an object and 
> thus true; it's just the combination of both that I find very irritating.)
> 
> Kind regards,
> Stefan
> 
> -- 
> 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
--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail!

-- 
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