3
monnef
4y

After some time experimenting with Haskell (with mixed impressions) and quite positive feeling about Scala, I am really shocked by Clojure. I tried simple example from youtube tutorial, but it looks so awful, complex and compared to Haskell and Scala version it is just so verbose. I read that Clojure is a concise language. Is the tutorial bad or is this a fine code in Clojure? I really don't like the code at all...

Comments
  • 1
    I adore Haskell's clean syntax, but for me it's Scala :)
  • 0
    @samblaise It's not only the parenthesis, I think I could get used to that (rainbow colors are nice). In Scala or Haskell this example would be much shorter. I wonder if the code from tutorial is subpar, not the best (most idiomatic) solution, because for example I saw a lot of bad Scala code in various tutorials/articles scattered on the Internet.
  • 1
    Well at least you have colored parentheses! Rainbow language yay!
  • 2
    Take a look on objective-c :)
  • 1
    Well... It depends on the implementation, but on the picture you uploaded, the whole second part can be simplified to only one line: ```(reduce * (range 1 n+1))```
  • 0
    @mk3d I disagree. Objective-C has much better syntax. Like most C-style languages, its not as crazy as Lisp-style languages.
Add Comment