Live data from Hacker News

Clojure will affect the way you think about programming

eli.thegreenplace.net

11–20 of 226 posts

Re: Clojure will affect the way you think about programming

#11
post #4

I just saw an article recently about core.async and the "go" macro, which seems to effectively give you goroutines in Clojure. I'd be very tempted to use it for that reason alone. I love Go's concurrency, but it can be a little on the verbose side. Good for some projects, but not all of them.

Go is verbose? I'm surprised to hear that, to be honest. Can you say what it's verbose in comparison to? What production language/framework has terser concurrency with the same expressiveness?

Re: Clojure will affect the way you think about programming

#14
post #5
post #2

I have switched between many programming languages, and if you are considering Clojure I would highly recommend it. It is immutable first, which helps eliminate many classes of explicit bugs and non-obvious anti-patterns. It also works across Java / Javascript allowing for a common code base of business logic across all layers, and with React Native looks and performs well on iOS and Android.

When you say it works across Java/JavaScript - could you expand? Can I essentially write Clojure that compiles to JavaScript?

Clojure uses reader conditionals https://clojure.org/guides/reader_conditionals that allow writing code that cross-compiles between different platforms, and generates platform specific code when necessary.

Many Clojure libraries cross-compile between Clojure and ClojureScript. You can see an example here https://github.com/yogthos/json-html/blob/master/src/json_ht...

Re: Clojure will affect the way you think about programming

#18

The perfect language? I doubt that. It's probably quite decent.

The perfect language to expand your brain. In a world dominated by java, php, c++,... In my opinion yes, Clojure could the perfect language to continue learning concepts, at same level would be Haskell.

It's also very pragmatic, and probably most used functional languages in the industry at this point.

Re: Clojure will affect the way you think about programming

#20
Clojure is the language where LISP clicked for me. Can't recommend it enough, it's got all of it - immutable datastructures, convenient data literals, simple and composable concurrency primitives, very thin interface to host VM.

Just put enough effort to get beyond that "omg parenthesis" barrier and it will be a delight. It's like that Half-life joke: there are two kinds of people, those that finished Half-life many times and those that never got off the train (which as somebody will probably point out, is a variation on another joke, but you get the idea).

totally unaffiliated: https://www.braveclojure.com/clojure-for-the-brave-and-true/

Post reply on HN