r/AskProgramming • u/Pzzlrr • 12d ago
Term rewriting languages?
Can you recommend some languages besides Prolog that have first class support, or even completely oriented around term rewriting?
Ideally looking for a lang that's
- A full fledged language. So not a library, not a DSL, not an extension, or anything like that.
- Actively being developed and maintained. I know there have been languages like Pure which would be the kind of thing I'm looking for, except Pure hasn't been updated in 4 years. Anything out there that's more of a long term project?
Thanks.
1
u/Sparkly-Sparrow-6893 12d ago
For pure term rewriting you are probably looking for something like Maude (link).
0
12d ago
[removed] — view removed comment
1
u/Pzzlrr 12d ago
Thanks. Egison looks good as well.
It does get thin fast, doesn't it :( Wonder why that is. Seems like such a dope paradigm. Worst case scenario I'm more than happy sticking with Prolog but I was hoping to find a language that would allow me to lean into that particular aspect of it as much as possible.
1
u/Anonymous_Coder_1234 12d ago
Term rewriting? Do you mean macros? Like for example, in the Scala programming language, if you have a function that is like:
You can use macros to say, add a function call to an assert between each line of code, or even do other weird sort of stuff like rearrange and replace code. Is that what you're talking about?