Hacker News new | ask | show | jobs
by FatalError 4428 days ago
In case anyone else misunderstood the title, this article doesn't demonstrate the unique ability of Lisp to solve this problem. The method they use is constraint solving using backtracking. This could be implemented in any language.

It is a good illustration of code-as-data in Lisp. It's just that in this case, code-as-data doesn't seem to be a particular advantage in solving the problem (it's not a disadvantage either, just a stylistic difference).

So this article could have been 'A C solution to "Einsteins Riddle"' if C had been chosen as the language. Not a criticism, just a clarification, since HN is full of people looking for the true potential of new/different languages.

1 comments

> the unique ability of Lisp to solve this problem

Problem solving and algorithms exist independent of programming languages.

What's unique to this version here, is the use of a code generator.

http://www.weitz.de/files/einstein-minimize.lisp

> So this article could have been 'A C solution to "Einsteins Riddle"' if C had been chosen as the language.

The code would have looked vastly different.