Hacker News new | ask | show | jobs
by art-w 4210 days ago
This example is bizarre, because a fast implementation is probably going to rely on a SAT solver, at which point the "queens code" (in any language) becomes a declarative specification of the solution!

Also, I don't think that Haskell, OCaml, (or Prolog) are that much declarative: They have a very clear evaluation model, which you need to know in order to write any code. They also have debuggers as a result.

2 comments

That was what my point was supposed to be. Just like saying that "foo.sorted()" is more declarative than looking at the implementation of quicksort. However, the implementation of quicksort (that is actually fast) is much easier to understand in most imperative implementations than it is otherwise.

Regardless, I do apologize for the noise.

> They have a very clear evaluation model, which you need to know in order to write any code.

What programming languages don't require you knowing their evaluation model?