3 ms·
Clojure is the language that made me "understand Lisp", as originally stated by Eric Raymond and citet by Paul Graham: https://paulgraham.com/avg.html https://p
by vaylian 7mo ago
Clojure is the language that made me "understand Lisp", as originally stated by Eric Raymond and citet by Paul Graham: https://paulgraham.com/avg.html https://paulgraham.com/avg.html
It seems like a small thing, but Clojure's choice to open up for other types of parentheses made seeing the structure of lisp programs much easier. This helped me understand how code is data and how macros are functions that can transform both code and data.
An important design philosophy (which is also hinted at in the trailer) is "simplicity". Clojure is designed to give you the tools to build simple solutions to the problems that you want to solve. It approaches mutability, which is one of the key sources of complexity in programming, with immutable data structures. It's a really clever way to do functional programming where your data is copied a lot but the copies are lightweight.
I don't write Clojure any more these days. I'm mostly doing Rust. But it is true what Eric Raymond said: Lisp has made me a better programmer.
Also: XKCD 224 and 297
- zerr 7mo agoLisp philosophy is all about inventing languages (libraries), creating abstractions for each problem. Clojure is all about using primitive data types and maps everywhere explicitly.
- midnight_eclair 7mo agovirtually all abstractions are built on top of primitive data types and mappings
- lo_zamoyski 7mo ago> virtually all abstractions are built on top of primitive data types Obviously. The point being made is that the Clojure style discourages building DSLs and the like and prefers to remain close to Clojure types and constructs. It departs in various ways from traditionally Lisps.
- midnight_eclair 7mo ago> Clojure style discourages building DSLs does it really? https://github.com/simongray/clojure-dsl-resources https://github.com/simongray/clojure-dsl-resources
- embedding-shape 7mo agoI think you're talking past each other. "DSLs" can both mean "Using the language's variant of 'arrays' to build a DSL via specific shapes" like hiccup in Clojure does, and also "A mini-language inside of a program for a specific use case" like Cucumber is its own language for acceptance testing, but it's "built in in Ruby" in reality. Clojure favors the "DSLs made out of shapes" rather than "DSLs that don't look/work like lisp inside of our programs".
- midnight_eclair 7mo agono, not really. when people talk about DSLs in context of lisps, they usually still mean staying in the domain of s-expressions.
- embedding-shape 7mo agoYes, maybe that's the sort of DSL you're talking about, the other person mentioned "Clojure style discourages building DSLs" which I'm fairly sure to be about the other DSL and is also true, hence the whole "you're talking/reading past each other".
- midnight_eclair 7mo agothat doesn't make sense, why would they be talking about departure from traditional lisps if they weren't talking about macro-based DSLs?
- embedding-shape 7mo ago