<story><title>Wisp: a homoiconic JS dialect with Clojure syntax, s-expressions and macros</title><url>http://jeditoolkit.com/try-wisp/</url></story><parent_chain><item><author>dhamidi</author><text>What is the benefit of having three ways to write strings?&lt;p&gt;&lt;pre&gt;&lt;code&gt;        \a  ;; compiles to &quot;a&quot;
	:a  ;; compiles to &quot;a&quot;
	&quot;a&quot; ;; compiles to &quot;a&quot;
&lt;/code&gt;&lt;/pre&gt;
This is not meant as destructive criticism; I&apos;m genuinely interested in the motivation for that.</text></item></parent_chain><comment><author>wging</author><text>To expand on others&apos; answers: In Clojure, \a is a Java character, :a is a Clojure keyword, and &quot;a&quot; is a Java string.&lt;p&gt;&lt;pre&gt;&lt;code&gt;    user=&amp;#62; (type \a)
    java.lang.Character
    user=&amp;#62; (type :a)
    clojure.lang.Keyword
    user=&amp;#62; (type &quot;a&quot;)
    java.lang.String
&lt;/code&gt;&lt;/pre&gt;
The only unusual thing is the keyword. Fogus and Houser say this: &quot;Because keywords are self-evaluating and provide fast equality checks, they&apos;re almost always used in the context of map keys.&quot; But here you&apos;re back to checking equality of strings. Not sure if the same is true for ClojureScript.&lt;p&gt;You can also use them as functions to look up values in maps. For example:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    user=&amp;#62; (:my-key {:other-key 1, :my-key 2})
    2
&lt;/code&gt;&lt;/pre&gt;
There are other places they&apos;re used--for example, list comprehensions with `for`:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    (for [x (range 10)
          y (range 10)
          :when (= x y)]
      [x y])
    =&amp;#62; ([0 0] [1 1] [2 2] [3 3] [4 4] [5 5] [6 6] [7 7] [8 8] [9 9])
&lt;/code&gt;&lt;/pre&gt;
In Clojure keywords are nice to have.</text></comment>
<story><title>Wisp: a homoiconic JS dialect with Clojure syntax, s-expressions and macros</title><url>http://jeditoolkit.com/try-wisp/</url></story><parent_chain><item><author>dhamidi</author><text>What is the benefit of having three ways to write strings?&lt;p&gt;&lt;pre&gt;&lt;code&gt;        \a  ;; compiles to &quot;a&quot;
	:a  ;; compiles to &quot;a&quot;
	&quot;a&quot; ;; compiles to &quot;a&quot;
&lt;/code&gt;&lt;/pre&gt;
This is not meant as destructive criticism; I&apos;m genuinely interested in the motivation for that.</text></item></parent_chain><comment><author>chongli</author><text>Those are 3 distinct types in Clojure; unfortunately they have no equivalents in JavaScript, thus they become strings.</text></comment>