News for hackers. Stuff that matters.
Re:Designing a Language Without a Parser by iopq on Wednesday July 05, 2023 @04:42AM (#36597550)
But Rust macros also do this, the procedural macros operate on the AST of the macro

https://doc.rust-lang.org/reference/procedural-macros.html

Re:Designing a Language Without a Parser by medo-bear on Wednesday July 05, 2023 @05:22AM (#36597846)
Plenty of languages give you the option of writing macros, however the difference between writing macros in a lisp and those languages is like the difference between using a general purpose programming language and an accidentally Turing-complete one.
Re:Designing a Language Without a Parser by eru on Wednesday July 05, 2023 @05:25AM (#36597868)
C's preprocessor is such an 'accident'. But eg Rust's macros and template Haskell are very deliberately designed.
Re:Designing a Language Without a Parser by medo-bear on Wednesday July 05, 2023 @05:57AM (#36598126)
No. You can say that Common Lisp and Racket are deliberately designed around macros. In Haskell, Rust, C++, they have been bolted on to the language as an after thought. Unless I am mistaken, those languages do not have the ability to write DSLs interactively, unlike Common Lisp.
Re:Designing a Language Without a Parser by eru on Thursday July 06, 2023 @08:47PM (#36625494)
What do you mean by 'write DSLs interactively'?
Re:Designing a Language Without a Parser by lispm on Friday July 07, 2023 @04:32PM (#36637931)
That's not how Lisp works. Lisp macros don't operate on an AST.
Re:Designing a Language Without a Parser by iopq on Sunday July 09, 2023 @03:48PM (#36658172)
I don't know how they work, how do they work?
Re:Designing a Language Without a Parser by lispm on Tuesday July 11, 2023 @03:36PM (#36686207)
Macros get and produce unparsed Lisp code, as nested lists.