Re:Ask HN: Is Lisp the Linux of Languages?
by erik_seaberg on Monday September 02, 2024 @06:22PM
(#41429260)
There's a very steep tradeoff between the approachability of a macro and that of its expander code. Look at Rust macro_rules!, or Scala macros, or Template Haskell. A formal grammar can define a strongly-typed deeply hierarchical data structure, but the code to drill in and map to a different deeply hierarchical data structure by hand seems to become a nightmare. Even Scheme hygenic macros are noticeably harder than "take a macro call as a list, use quasiquote to return a list that starts with PROGN" which makes it actually feasible (if risky!) to start cranking out macro expanders.
[ Parent
| on HN ]
Re:Ask HN: Is Lisp the Linux of Languages?
by krschacht on Monday September 02, 2024 @08:01PM
(#41429826)
Yes, I’ve been wondering if this is the core tradeoff. Especially as I compare Arc to Ruby. I love the readability of ruby code, but it’s easy for the meta programming to become very difficult to read. The language is quite flexible, but it’s not easy to change in the ways you want. Whereas Arc Lisp’s code is much more difficult to read, but the macro syntax is very elegant for an incredible amount of flexibility.