3 ms·
1. Fair point 2. Mutable state can lead to really subtle bugs 3. Sure but no more than Haskell or any other terse FP lang, Scala included 4. defrecord works
by swannodette 16y ago
1. Fair point
2. Mutable state can lead to really subtle bugs
3. Sure but no more than Haskell or any other terse FP lang, Scala included
4. defrecord works wonders. You get all the flexibility of a map with the context of an actual type
5. It takes me hours to do things in Ruby that I could dash out in Clojure.
6. Right.
Quite a few people in the Clojure have come from Scala. So everyone is entitled to their own opinion.
- cageface 16y ago2. Mutable state can lead to really subtle bugs Absolutely, but these aren't ends of the same stick. You can have immutable but eager, which is simpler to model mentally a lot of the time, at least for me. Simon Peyton-Jones has said that perhaps Haskell should have made eager evaluation the default and I'm inclined to agree that lazy evaluation is very powerful but maybe not a good default. 3. Sure but no more than Haskell or any other terse FP lang, Scala included True, although the baseline for a lot of Clojure code is higher, IMO. 4. defrecord works wonders Maybe so. I haven't really gotten my head entirely around the options for datatypes in CLJ yet. 5. It takes me hours to do things in Ruby that I could dash out in Clojure. It's true. Clojure makes some things that are hard to do in other languages much easier. Programmers are different, so we shouldn't expect one set of tools to suit us all equally well.
- amalcon 16y agoClojure makes some things that are hard to do in other languages much easier. I once heard it put that "Functional programming makes all problems equally hard." When taken figuratively, it does make a lot of sense: the things that are hard to do functionally tend to be things that are easy to do procedurally (e.g. UI stuff -- the code obviously, not the design).
- swannodette 16y agoI don't think you'll find that UI programming in Clojure is all that difficult. Here's the beginning of a relatively involved RTS game in Clojure: http://groups.google.com/group/clojure/browse_thread/thread/ff18795390b5960b# http://groups.google.com/group/clojure/browse_thread/thread/....