Live data from Hacker News

Why Clojure?

blog.cleancoder.com

31–40 of 202 posts

Re: Why Clojure?

#31
post #5

It just breaks my heart to see Uncle Bob seduced by a Java-family language right when C++ is getting increasingly fun. He suffered through the bad old days when C++ was only fast and powerful, and is now missing out on the good new days. I guess he's happy. At least he isn't touting Haskell. Bon Voyage, Bob! But somebody needs to break it to him that Lisp is not a functional language. Or, if it is, so is C++.

Many lisps like Common Lisp are multi-paradigm (imperative, OO, functional). Some like Clojure are built on OO runtime and can call Java OO code, but in general heavily favor immutability and functional programming. So you're focusing on one sentence (that is arguably incorrect or only partly correct) and missing the intent of the article.

Re: Why Clojure?

#32
post #12

Can anyone give a pro/cons analysis of a ML variant versus of a Lisp variant. Let's say F# versus Clojure? One of the general arguments in Lisp vs the world is that lisp is more concise. F# is really concise. It has datastructures as intrinsic part of the language syntax (just like Clojure, i.e in F# [|,,,|] is an array and in Clojure [...] is a vector, so more or less the same thing). Furthermore, the type inference…

Great question as I'm trying to make that decision myself. I love Lisp in general and the JVM is great and ubiquitous, so Clojure seems good. The reality is that every time I try to learn it, I get stuck learning leinegen, Emacs...etc, which is more than I have to deal with when using Python, so I skip it. Also, it seems like you get a .jar file and have to run it in conjunction with something like "Java -jar clojure…

Thanks! I have the same feeling - the ecosystem with F# feels more robust and production ready. But it might be just because I've never been a Java guy and the things that seem obscure to me in Clojure are trivial to Java people.

Re: Why Clojure?

#33
post #32

Earlier quoted context omitted.

Great question as I'm trying to make that decision myself. I love Lisp in general and the JVM is great and ubiquitous, so Clojure seems good. The reality is that every time I try to learn it, I get stuck learning leinegen, Emacs...etc, which is more than I have to deal with when using Python, so I skip it. Also, it seems like you get a .jar file and have to run it in conjunction with something like "Java -jar clojure…

Thanks! I have the same feeling - the ecosystem with F# feels more robust and production ready. But it might be just because I've never been a Java guy and the things that seem obscure to me in Clojure are trivial to Java people.

I think both are very production worthy as far as reliable code running in production.

Check out the success stories on the Clojure site. One of the biggest ones to me is Walmart using it for Black Friday e-commerce. That is a good indicator to me. They've had good success stories with F# as well, but C# uses F# as a research language and the best bits are kind of bolted back onto C#. It keeps C# as less painful than Java, so less devs make the jump. Honestly, the future for both languages isn't 100% secure. I just wish both languages got more love.

I'm in the same boat as you. Clojure seems to really be meant for someone who already has a few years of Java experience. There are plenty of examples where someone dips into Java and I'm totally lost.

Re: Why Clojure?

#34

Can someone explain me why they always (OK let's say almost always) use math formulas to show what you can do with a programming language ? I'm a desktop application programmer, not a mathematician. I don't need to print the first 25 squares of integers or Fibonacci whatever. In fact I think the hardest math I did at work was using modulo to get even and odd numbers ... Show me how you parse a csv file, how do you co…

I'd read the crap of an article that summarizes how any 10 languages handle these general purpose tasks.

Re: Why Clojure?

#35
post #3

Clojure is by far the best programming language I've ever used. Rich Hickey's Sermons On The Mount changed the game of programming once and for all. With Clojure you could finally have your Lisp cake and eat it. Witness the sheer chutzpah of the guy when he basically told Ruby devs they were doing it wrong at Rails Conf in 2012 ( https://www.youtube.com/watch?v=rI8tNMsozo0 ).

> by far the best programming language I've ever used

Would love to hear why? What is that make Clojure such a good experience for you?

Re: Why Clojure?

#36
post #14

Earlier quoted context omitted.

Extracting two columns out of a excel sheet: (->> (d/load-workbook file "Questionnaire.xlsx") (d/select-sheet "Sheet1") (d/select-columns {:A :item :B :price}))

Now we're talking. It would probably take 20+ lines of C# to do the same thing. How do you manage errors? What happens if Questionnaire.xlsx or Sheet1 doesn't exist ?

> How do you manage errors?

It becomes unwieldy like every other language.

> What happens if Questionnaire.xlsx or Sheet1 doesn't exist ?

Runtime exception.

I've seen too much Clojure code (and this goes for every language where error handling is optional - Hi Javascript!) just skip error handling and focus on "happy path".

And as demonised as Java's checked exceptions are, they at least forced error handling to be thought of.

Re: Why Clojure?

#37
post #3

Clojure is by far the best programming language I've ever used. Rich Hickey's Sermons On The Mount changed the game of programming once and for all. With Clojure you could finally have your Lisp cake and eat it. Witness the sheer chutzpah of the guy when he basically told Ruby devs they were doing it wrong at Rails Conf in 2012 ( https://www.youtube.com/watch?v=rI8tNMsozo0 ).

Ever play with Erlang or Elixir? If yes, I am curious what your thoughts are on them.

Re: Why Clojure?

#38
My team owns a Clojure app, amongst a lot of other apps - my understanding is the current DRI (who inherited this app once the original one left for another org) doesn't like working in it though, and that has been the experience of other developers who have been recruited to the project over the past two years. Most developers I work with on a day to day basis don't have any interest in learning Clojure, and would rather work with Scala, the JVM language most heavily used within my org.

One of my teammates also has production ClojureScript experience, and called it the worst of both worlds (Clojure and JavaScript). The primary problem is it doesn't try to abstract away the DOM, the most typically problematic part of working with JS.

Just my own encounter with it so far - I haven't had the experience of writing production Clojure myself, but from what I've seen with the syntax, I'm still happily primarily writing JS so far when I'm not writing Python/Scala/etc.

Re: Why Clojure?

#40
post #32

Earlier quoted context omitted.

Thanks! I have the same feeling - the ecosystem with F# feels more robust and production ready. But it might be just because I've never been a Java guy and the things that seem obscure to me in Clojure are trivial to Java people.

I think both are very production worthy as far as reliable code running in production. Check out the success stories on the Clojure site. One of the biggest ones to me is Walmart using it for Black Friday e-commerce. That is a good indicator to me. They've had good success stories with F# as well, but C# uses F# as a research language and the best bits are kind of bolted back onto C#. It keeps C# as less painful than…

You don't actually need to know anything about Java to be productive in Clojure. At least that was my own experience.
Post reply on HN