Live data from Hacker News

Why Clojure?

blog.cleancoder.com

11–20 of 202 posts

Re: Why Clojure?

#11
The most annoying phrase was "less code, less time, less...". Uncle Bob thought us to be explicit, help the reader understand the code and be verbose with the variables etc. Now he loves a Syntax that says #(25 % %)... Aaaalright, try to get a new company member understand a big code base with this massive oneliners. I doubt that this is the right language for enterprise projects.

Re: Why Clojure?

#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 inferences concierges the developer through the regular bureaucracy involved with strong type systems so effortlessly that you seldom notice it ... unless your code does not compile, in which case it's wrong somewhere and you need to fix it (which you needed to do anyway).

Ok, so for the sake of the argument, let's say the syntax is equally light for F# and Clojure, and their support for immutability is in the same ballpark. And let's remove the argument "a type system is an encumbrance" because that will only lead to situation specific debates - one side will say that massive refactorings are a pita without types, and the other side responds that in Clojure you can use data schemas and should have unit tests anyway. And those discussions never lead anywhere conclusive.

So, besides the above mentioned topics, is there anything general one can say of the distinctive advantages of these two languages in specific situations, including how their two different ecosystems and runtimes affect the calculus?

I suppose it's extremely rare to have experts who have participated in any large scale industrial developments with both of the languages, but if there are, it would be really nice to hear their opinion. And the things I listed as "outside of the discussion" might actually be critical, who knows...

Re: Why Clojure?

#13
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 connect to webservices or retrieve data from a database, show me how to do a simple GUI, show me something useful for the common dev.

I'll judge your ultimate programming language on these menial tasks that comprise 99.9% of my programming time.

Re: Why Clojure?

#14

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…

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}))

Re: Why Clojure?

#16
post #8
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++.

> that Lisp is not a functional language. Or, if it is, so is C++ You're missing the point. Everybody can write Fortran in any language.

[deleted]

Re: Why Clojure?

#17
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++.

[deleted]

Re: Why Clojure?

#18
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++.

[deleted]

Re: Why Clojure?

#19
post #14

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…

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}))

What is 'd'?

Re: Why Clojure?

#20
post #19
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}))

What is 'd'?

It's an alias given to an imported module name. In Python it might be:

  import really_long_name as rln
  rln.foo()
Post reply on HN