Open segeljakt opened 8 months ago
I agree that macros would be quite useful in egglog. However, text-based macros are usually a terrible source of bugs. A more promising direction would be to re-use an existing macro system, such as rust's or racket's. A #lang egglog would work well This is related to #232
Hmm, I haven't tried Racket but it looks like a good fit. I think there is also a lot of potential in making Egglog more powerful on its own, but maybe this is not important if Egglog is aimed to be a target for code generation.
Yeah, I think egglog as a target vs a language is up in the air right now
Hi, currently when using egglog there is some code duplication in my programs. For example:
If I am not missing something, it is currently not possible to parameterise commands/expressions. The only workaround I see is to write a program in Rust/Python which calls into Egglog.
Would it be possible to add basic support for macros that rely on textual substitution in egglog? This would allow reusing commands such as: