3 ms·
The article starts saying that Scala gives you lots of options while Clojure guides you to a certain style, but the Scala example takes the most complicated sol
by Shamanmuni 13y ago
The article starts saying that Scala gives you lots of options while Clojure guides you to a certain style, but the Scala example takes the most complicated solution as if every programmer would solve it that way. He's contradicting himself.
Scala can solve it in a way quite similar to Clojure. The author is trying to hammer a point about Clojure which doesn't emerge from the example, as most Scala programmers can notice.
It would have been great if he had listed all the possible solutions and told us "Scala lets you solve it in all these very different ways without the language guiding you, Clojure guides you to the simpler solution". That's a fair point, and one Scala programmers will tend to agree with.
- disputin 13y agoAgreed, any problem may be better solved by one or the other. What I notice, having never used Clojure, is that the Clojure devs may well finish the implementation while the Scala devs are still discussing the design. Of course, that level of flexibility will better suit some problems. I read a high profile project's coding guidelines recently: "Scala is a very flexible language. Use restraint." Perl's TMTOWTDI is the reason I moved to Python. I've recently been using Go instead of Scala, partly again because TMTOWTDI, whereas Go is supremely clean, but also, I think, Scala is just too big for my needs, a skyscraper when I need a house. This sounds a bit like sql vs nosql, rather than when should I use x vs y. I look forward to trying Clojure.
- lmm 13y agoHave you considered F# (or Ocaml), or Haskell? I can see good reasons to move away from Scala, but I don't think you need to throw away all that wonderful functional typing goodness.