(* Eliminating explicit loops means I can't get the pattern of iteration wrong -- which makes a whole class of bugs impossible. *)
Yes, but messing up loops may only be a small portion of total errors.
Good API designs can reduce loop complexity. For example, looping thru a DB result set (or cursor) can be as simple as:
rs = openRS([criteria])
while getNext(rs) {
[loop contents]
}
What is there to screw up here?
Again, I am not hellbent against closures, but I think they are overrated. They confuse newbies and complicate the language, adding only a marginal improvement.
If you have a "killer example" of closures doing something realistic far better than traditional approaches, I would like to see it.
(Perhaps one could argue that closures help clean up or wrap bad API's.)