Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

1. Unlike Python, Clojure actually is functional and is optimized for it, with persistent immutable data structures and a huge library for functional transformations. You get faster, more expressive code in Clojure than in Python if you’re doing FP.

2. The REPL is not on par. You can run an in-editor REPL and build your entire program in a REPL session. Combined with tap you can visualize your output on the fly.

3. Macros are used, not looked down upon. But they are discouraged when not needed. Much of the power and succinctness of the language comes from macros. Boilerplate is a solved problem.

There are a lot of subtle and less obvious advantages too, like namespaced keywords, a highly productive and creative niche community, a very composable and simple library ecosystem and a huge emphasis on stability.

But disadvantages exist too. The Clojure toolchain has a nice surface but is more involved under the hood. There’s also not a single happy path framework for the web, but rather a variety of library options. Finally, Clojure isn’t the best fit for certain types of programs, it’s really optimized for applications and data centric stuff.



> [Clojure] is really optimized for [\snip] data centric stuff

Not sure what this means. Stu Halloway made a comment to the effect of "all programming is ultimately data transformations". Honest question here, what programming language is NOT for data-centric stuff?

I find that when I'm working in verbose programming languages: Java, C#, it doesn't feel like all programming is data transformations, when in reality it is.


With data I mean information, knowledge representation etc.

Not real time video games and other graphics intensive stuff. Not device drivers, embedded and hardware specific stuff. Not bits/bytes level of programming…

There are more, but you get the gist.

Clojure is fantastic for business applications, DSLs, information processing, web development and so on.

The application space is huge, but it’s not meant for everything.


I see what you mean. Well answered. I think there needs to be a fix for this... like make Clojure first class for bits/bytes levels of programming. :)


> The REPL is not on par. You can run an in-editor REPL and build your entire program in a REPL session. Combined with tap you can visualize your output on the fly.

I would like to point out, for fellow Lispers who enjoy REPL driven development, that you can do this with Python in Emacs via Elpy. `elpy-shell-send-statement` is something like `eval-last-sexp` or `geiser-eval-last-sexp` or... etc.


Yes, in fact, that's exactly how I use the Python REPL. I can send the function or region from the emacs buffer to the Python console easily.


> The REPL is not on par. You can run an in-editor REPL and build your entire program in a REPL session. Combined with tap you can visualize your output on the fly.

In Python you could just open up a notebook if you wanted that.


It's not even close - it's not feasible to develop a real server application in a notebook, while you're absolutely will be doing REPL-driven development in Clojure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: