Friday, January 16, 2026

Matching recurring variables

The Egel interpreter is about a decade old, and I thought I kinda milked it already for all the blog posts I wanted to write about it. 

 The best overall feelings I have about the interpreter can be summed up as: A) It's a fine toy esoteric language, but please don't use it professionally. And B), I have a lot of fun coding Advent of Code solutions in it, and there's something to the language, but I cannot quite pinpoint what. 

Someone asked me where Egel would fall compared to other languages, and I am not entirely sure about that either. Q/Pure, Maude, Wolfram Language or something defined in Racket might be close. 

Refal came up during that discussion, and I looked into it. One thing that struck me is that Refal can pattern-match recurring variables. I could extend Egel with that, maybe. That would allow definitions like `def eq = \x x -> true | _ _ -> false`. It seems non-trivial, but on the other hand, all the machinery should be in place. But at the same time, it doesn't seem to useful a feature.