Hacker News new | ask | show | jobs
by Jtsummers 529 days ago
Like most things in programming, there is no "only way" to solve something, and certainly no one language (or DSL) to solve anything. You could solve it programmatically in C writing your own backtracker or state enumerator and a validation function for the rules (or block of code if you are like an old coworker that liked 10k SLOC C functions).

miniKanren, Prolog, and others let you write the rules more concisely (almost always) and clearly (most of the time, not everyone will write clear code and clarity is subjective) than that, though.