3 ms·
I understand what you are trying to say regarding macros and I think you are correct that many probably do not define their own macros and happily use the langu
by frompdx 5y ago
I understand what you are trying to say regarding macros and I think you are correct that many probably do not define their own macros and happily use the language as is. However, I think if macros are disabled everyone will notice right away.
(macroexpand '(defn foo [x] (println x)))
Returns:
(def foo (clojure.core/fn ([x] (println x))))
Clojure itself is built from macros. Even something simple like defining a named function with defn.
- geokon 5y agoMaybe I should have left off the last part b/c it's a bit provocative :) Yeah, the language itself is built on macros - but as a language user you don't really care as it's an implementation detail. I guess my point is that you could know nothing about macros and still use Clojure very productively. Selling Clojure as another Lisp feels like sell a car for its cupholders. The data structures, syntax, JVM interop, REPL etc. are more interesting and have little to do with Lisp. But that's just my opinion as a casual user
- blacktriangle 5y agoBut the reason you care is because the language is built out of the same machinery that you the developer have access to. It's not only an implementation detail because you have access to it as well.
- spindle 5y agoI suggest you post your two paragraphs separately so we can have fun upvoting the first one!