TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why Clojure?

3 pointsby jchen42over 4 years ago

1 comment

dreamcompilerover 4 years ago
&gt; Clojure provides some advantages over other Lisps like Common Lisp and Scheme: CL only includes lists in its core language spec. Clojure introduces vectors, sets, and maps which makes reading and writing code so much less tedious.<p>CL most assuredly includes vectors and hash tables in its core language spec (not to mention multidimensional arrays). And hash tables are one form of what Clojure calls a map. (The other forms exist in Common Lisp too; they&#x27;re just called different things.)<p><a href="http:&#x2F;&#x2F;www.lispworks.com&#x2F;documentation&#x2F;HyperSpec&#x2F;Body&#x2F;t_vector.htm" rel="nofollow">http:&#x2F;&#x2F;www.lispworks.com&#x2F;documentation&#x2F;HyperSpec&#x2F;Body&#x2F;t_vect...</a><p><a href="http:&#x2F;&#x2F;www.lispworks.com&#x2F;documentation&#x2F;HyperSpec&#x2F;Body&#x2F;18_.htm" rel="nofollow">http:&#x2F;&#x2F;www.lispworks.com&#x2F;documentation&#x2F;HyperSpec&#x2F;Body&#x2F;18_.ht...</a><p>The author may be assuming that because CL does not use the &#x27;[]&#x27; and &#x27;{}&#x27; delimiters, CL doesn&#x27;t implement the things that Clojure uses &#x27;[]&#x27; and &#x27;{}&#x27; for. If so, that assumption is wrong.<p>If the author finds that the use of &#x27;[]&#x27; and &#x27;{}&#x27; make code more readable, that&#x27;s a matter of opinion. It would take about 6 total lines of code to teach CL to read &#x27;[]&#x27; and &#x27;{}&#x27; as a vector or a hash-table if one so desired. And yet over several decades of programming in Common Lisp, I have yet to see a program where a programmer did that. That tells me that working Common Lisp programmers have no difficulty with vectors or hash-tables absent special delimiters.