It is a straw-man argument to say that macros in LISP-like languages are amazing because you don’t need to generate strings and eval them. Most macros systems I’ve used (in Scala, Haskell, and Rust) work over ASTs instead of strings. In some cases (typed TH), you even get to reason about the type of the expressions represented by your ASTs. Even LISP quoting/unquoting facilities have their analogue in other languages with quasi quotation.
I view extra syntax as having a similar benefit as syntax highlighting: it enables my eyes to quickly navigate to specific parts of the code (branching constructs, type signatures, side effects, etc.). In both cases, there’s obviously a balance for everyone.
The point about macros was mostly in comparison with languages that don’t have them at all. I haven’t done much macro work in any language, probably the most in Clojure, a bit in Haskell, and I guess I’ve done template programming in C, if you want to count that, so I’m not really the right person to ask when it comes to the tradeoffs of different the macro systems out there. I’m also very torn on how I feel about them, because in many languages they end up being a pain to debug, so I mostly stay clear of them, but I think they can provide a lot of value to library authors.
I like that argument about syntax highlighting/visual distinction, that is a good point.
It is a straw-man argument to say that macros in LISP-like languages are amazing because you don’t need to generate strings and eval them. Most macros systems I’ve used (in Scala, Haskell, and Rust) work over ASTs instead of strings. In some cases (typed TH), you even get to reason about the type of the expressions represented by your ASTs. Even LISP quoting/unquoting facilities have their analogue in other languages with quasi quotation.
I view extra syntax as having a similar benefit as syntax highlighting: it enables my eyes to quickly navigate to specific parts of the code (branching constructs, type signatures, side effects, etc.). In both cases, there’s obviously a balance for everyone.
The point about macros was mostly in comparison with languages that don’t have them at all. I haven’t done much macro work in any language, probably the most in Clojure, a bit in Haskell, and I guess I’ve done template programming in C, if you want to count that, so I’m not really the right person to ask when it comes to the tradeoffs of different the macro systems out there. I’m also very torn on how I feel about them, because in many languages they end up being a pain to debug, so I mostly stay clear of them, but I think they can provide a lot of value to library authors.
I like that argument about syntax highlighting/visual distinction, that is a good point.
That’s a beautiful theme, based on Hakyll. I’ll add that to my list of Tufte-inspired static site generators: Ivy and Athena.