guicho271828 / trivia

Pattern Matcher Compatible with Optima
Other
335 stars 22 forks source link

unification at level1 ? #76

Closed ghost closed 7 years ago

ghost commented 7 years ago

I've often felt the need for a nice Prolog-ish DSL in CL. One limitation with implementations such as that in PAIP is that the pattern-matching is rather ad-hoc and not very satisfactory (in comparison to trivia). Adding some sort of unification for (level-1) patterns would make things very nice IMO.

I have been tinkering with level-1 definitions and while somethings are fairly straightforward, some are not. Things like unifying 'x and (list 1 2), where one of the patterns have to be reverse-engineered ala Prolog itself. I'm guessing however that the compiler itself is regular enough that handling this list-comprehension thing shouldn't be that difficult.

ghost commented 7 years ago

This is likely to fit better in a new project. Closing.