On Saturday, April 11, 2015 at 5:10:37 AM UTC+10, AndyR wrote:
> I think it's because of the test for equality. I still like the official 
> clojure page for explanations:
> http://clojure.org/data_structures#Data%20Structures-Keywords
> 
> Run a few experiments in a repl:
> 
> 1 (identical? "ab" "ab")
> 2 (identical? "ab" (str "a" "b"))
> 3 (identical? :ab :ab)
> 4 (identical? :ab (keyword (str "a" "b")))
> 
> Run the same with (= ...) and observe.
> 
> (1 tests true since the JVM also has a string pool IIRC)


As an aside:  there is a difference between Clojure and ClojureScript when it 
comes to strings testing identical.

https://groups.google.com/forum/#!topic/clojurescript/tSddMXxpTrA

--
Mike

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to