Re:How Lisp Became God's Own Programming Language
by mark_l_watson on Tuesday October 16, 2018 @10:55AM
(#18229866)
I have used Clojure on several customer projects and my own Cookingspace.com hobby project. I like Clojure except for the way recursion is handled. I have been using various Lisps since 1982 and Clojure’s support for recursion bugs me.
Re:How Lisp Became God's Own Programming Language
by nmg on Tuesday October 16, 2018 @12:19PM
(#18230614)
IANA clojurian, but its inelegance of tail recursion is a limitation of java, correct?
Re:How Lisp Became God's Own Programming Language
by Royalaid on Tuesday October 16, 2018 @12:34PM
(#18230745)
Yeah, because the JVM can't do TCO you can't have nice recursion. The options in the language provides are good enough but definitely not the most ergonomic.
Re:How Lisp Became God's Own Programming Language
by socksy on Tuesday October 16, 2018 @02:22PM
(#18231821)
I can't remember the last time I wrote a recursive call in Clojure, other than for multi-arity. In general, if I were in a code review and saw the "recur" keyword, I think I would regard it as a code smell and see if I can re-implement it using higher order functions.
I'd argue Clojure is setting some new standard here with its powerful literal notation for basic data structures (list, vector, set, and maps) and its practice of integrating/composing first on data. Most of the time that's enough to get some libraries work together. If not enough, integrating/composing on functions is the next stage. Only after having covered data and functions should you consider macros, which should be easier to write if you have done a good job at the data and function levels.
If such powerful and ubiquitous data structures work so well for programs written in clojure(script), why would that not be true in the larger picture for integrating systems? JSON worked much better than XML because it actually represents simple data structures, not objects talking to each other. Redis, Avro, and similar tech are continuing that story while Kafka adds a fantastic transport and storage mechanism. Sounds like we're closer to having better foundations for integration in the small and in the large.