TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why do you enjoy working with Clojure?

4 点作者 logari将近 6 年前
What didn&#x27;t you like about it? That is, what could be improved?<p>If you know other languages that you actively use in production, how does clojure stack up&#x2F;compare against those languages?

2 条评论

slifin将近 6 年前
Clojure is the only language I know that does data orientated design, i.e. Gardern, Hiccup, HoneySQL<p>Clojure is the only language I know that has a library that does full-stack graphs, from server to client, always a graph until execution time (Fulcro)<p>Clojure is the only language I know that has a datalog based query language against an immutable time travelling database that allows you to write one query against your database and retrieve nested sets (Datomic)<p>There&#x27;s a lot of breakthrough ideas in Clojure that don&#x27;t spread beyond Clojure, but they flow into Clojure from other languages because Clojure is a parasitic language<p>Clojure could lower its barriers to entry with more &quot;cool&quot; landing pages, prettier documentation, the kinds of things that attract &quot;new hip&quot; developers<p>I myself gave up with it initially until I discovered Parinfer
iLemming将近 6 年前
I like Clojure for many reasons, the main one is obviously REPL. When people say: &quot;Python has a REPL&quot;, &quot;nodejs has a REPL&quot;, etc. they don&#x27;t understand what is it so special about Lisp, why Lispers claim that other (non-lispy languages) don&#x27;t have &quot;real&quot; REPLs. You have to be a Lisper to understand what makes Lisp REPL more &quot;real&quot; and the others merely &quot;interactive shells&quot;. Being able to evaluate any structure without any preceding ceremony is invaluable. Add immutable data structures on top of that and you&#x27;d understand why people choose Clojure.<p>Other reasons:<p>- Spec - people dismiss Clojure because it is dynamically typed, without even checking out Spec. You can do things with Spec that most static type systems simply can&#x27;t do. Also property based, generative testing derived from specs is so cool.<p>- Clojurescript. It is probably the most &quot;production&quot; ready alt-js language. I&#x27;ve used Coffescript, Typescript, Livescript, GorillaScript, IcedCoffescript, GHCJS, Babel, Traceur, looked into Purescript, Elm and ReasonML. Clojurescript today is truly the only practical choice.<p>- Stability. I don&#x27;t know any other language ecosystem, where you can grab any old library, update a bunch of dependencies and still have a high chance for everything to work.<p>- Consistency. Clojure&#x27;s standard library is pretty nice and predictable. Nothing can really compare to it, even Python&#x27;s famous &quot;batteries&quot;. Javascript doesn&#x27;t even have standard library, instead you have to choose from lodash, immutablejs, folktale, rambda, crocks, sanctuary, fantasyland, etc. etc. Sometimes people keep them all in the same codebase. Because of that consistency in clojure.core functions, you can actually share code between front-end and back-end.<p>- JVM. People dismiss Clojure, because it is hosted on JVM, but they overlook the fact that JVM is very mature, extremely well-done piece of technology. Try deploying, maintaining and scaling nodejs clusters. It&#x27;s not fun.<p>- Syntax. Do you know how big is the precedence table in Javascript? It&#x27;s like over 25 items in it. Clojure doesn&#x27;t have a precedence table. No need for it. Do you know how many things can be falsy in Javascript? Six. In Clojure - only two. Javascript has 64 reserved words. Clojure has none. This all makes things so much simpler.
评论 #20610362 未加载