|
|
|
|
|
by mjw1007
2311 days ago
|
|
I'm sure Norvig is very good, but I think the sudoku webpage is presenting a finished program in an idealised way, not recording the process he used to write it, false starts and all. (It seems likely to me that there were some false starts, because eliminate() returns either `values` or False, when both of its callers would be just as happy if it returned True or False.) |
|
Also I'm not trying to say that there's not some YAGNI going on here--just that I suspect he did it that way somewhat reflexively, and that in that particular case we probably cannot infer he had originally intended to do something else with those results and then changed his mind later.
[0] at least in the Lisp world, which Norvig has extensive experience with[1]
[1] https://github.com/norvig/paip-lisp