r/Clojure • • 7d ago

The Bowling Game - From Imperative to Functional Programming - Part 4

https://fpilluminated.org/deck/280
26 Upvotes

1 comment sorted by

2

u/pauseless 2d ago

Not to be too critical, but Uncle Bob’s Clojure code leaves a lot to be desired, in general and not just here.

The final Clojure code is fine, in my opinion, and when you reintroduce type declarations for Scala/Haskell, the same length or shorter.

Also a note that Clojure is different to Scala and Haskell here: you’re not destructuring on each case in the match. You do it once at the start and then go through the conditions. This is cleaner to me.