4 ms·
If you discard the idea of working with objects, and instead work with data structures directly, you get generic querying and transversal for free. A lot of th
by weavejester 13y ago
If you discard the idea of working with objects, and instead work with data structures directly, you get generic querying and transversal for free.
A lot of these points look like they're solved by Clojure, but Clojure is my hammer, so perhaps it's cognitive bias that these look like Clojure-shaped nails.
- nickbauman 13y agoRight. Actually a lot of the issues Bicking points out were handled by Lisps years ago. And you don't have to give op on objects per se: Objects in Clojure (with ad-hoc typing) can be treated as maps and darned near anything is seq-able in that Lisp dialect! Having s-expressions and macros lets you traverse and recombine things you could only imagine doing in Python. And don't even get me started on the power of laziness in Clojure. Don't get me wrong: Python pays the bills these days. And that language is an able workhorse. But boy do I miss Clojure. The reason I don't use it at work is that I work in Android, iOS and Google App Engine most of the time. Which means Java, Python and Objective-C. The code world has infantilized away from Lisp too far.
- weavejester 13y agoObjects in Clojure are an implementation detail of the JVM. Clojure doesn't really use objects as objects. Records are, essentially, just maps with some type metadata attached. They're implemented as classes purely for performance purposes.