3 ms·
If you are asking about learning metaprogramming as a paradigm I would rather suggest Racket. Lisps are famous for their metaprogramming capabilities and you ha
by avichalp 7y ago
If you are asking about learning metaprogramming as a paradigm I would rather suggest Racket. Lisps are famous for their metaprogramming capabilities and you have Clojure at the top of your list but writing macros are way easier in Racket than in Clojure. This is primarily because Racket IDE provides good debugging and tracing tools. Clojure is notorious for its cryptic error messages. This certainly doesn't help while you try to do code transformations. Once you learn the fundamentals you can apply them in (somewhat) more mainstream functional programming languages like Clojure or Rust.
- Rerarom 7y agoBut Racket doesn't have macros a la Common Lisp, which are the most powerful way to achieve metaprogramming in the Lisp family.
- jbotz 7y agoNonsense. Racket has hygienic macros just like CL.
- wtetzner 7y agoRacket has syntax-case[1], which is hygienic, but allows you to break hygiene if you need to. Racket also supports defmacro[2] like Common Lisp, and it's actually implemented using syntax-case. I would argue that syntax-case is at least as powerful as defmacro. [1] https://docs.racket-lang.org/guide/syntax-case.html https://docs.racket-lang.org/guide/syntax-case.html [2] https://docs.racket-lang.org/compatibility/defmacro.html https://docs.racket-lang.org/compatibility/defmacro.html