News for hackers. Stuff that matters.
Re:Forth: The programming language that writes itself by teddyh on Saturday February 25, 2023 @02:55PM (#34939833)
What LISP has, uniquely, is its macro system which, unlike text-based macro system like C, operate on the abstract syntax tree level.
Re:Forth: The programming language that writes itself by jacobmartin on Saturday February 25, 2023 @07:10PM (#34941787)
For sure. Additionally, the syntax of lisp also makes these AST macros ergonomic and, in many cases, beautiful. Rust has AST-transforming macros, but they're harder to use because the syntax is more complex. They're also quite ugly.
Re:Forth: The programming language that writes itself by bmitc on Sunday February 26, 2023 @05:46PM (#34950490)
Is that enlightening though? For example, Common Lisp, Scheme, Racket, Clojure, Elixir, and Prolog all have abstract syntax tree macro systems that all differ from one another. And I would argue that macros should, in general, be avoided. They can be very enabling though to extend the given language when used with constraint and moderation.