3 ms·
In my experience, this is far less common in Clojure and far from idiomatic. The language’s core data structures and abstractions around them are all[1] based a
by eyelidlessness 4y ago
In my experience, this is far less common in Clojure and far from idiomatic. The language’s core data structures and abstractions around them are all[1] based around `seq`, which is conceptually list-like in some respects. But among other distinctions (eg seq is presumed lazy by most APIs), it’s used to back various higher-level data structures, with various map structures in common use. There is an actual list type/structure which more or less works like cons, but it’s generally only used for code structure. I’m sure there’s a lot more that’s not “lisp” about Clojure, but I think this divergence is one of its big strengths.
From what I’ve seen, this also seems uncommon in Racket, but I haven’t actually written code in Racket or spent time in the ecosystem, so I can’t say nearly so much about what’s typical with much confidence.
1: Excepting reference types, which are all based around either transactional logic, “transients” which are scope-local mutables, or host VM interop.
- lispm 4y agoIn Clojure programs you'll see a lot more unidentified data (-> maps) than in object-oriented Lisp.
- eyelidlessness 4y agoAs long as it Seqs it doesn’t matter! (Just kidding, this is why I found greener pastures of static types.)