← Back to context

Comment by lucideer

4 years ago

Sibling commenters have already pointed out that you seem to have misread the post, but tbh I found it quite confusing to follow myslf, so here's a summary:

- the first answer posted on SO was a simple loop

- the author posted a 2nd (supposedly faster but less readable) answer. The author didn't think this answer was better than the loop, but it seems the community did and it became accepted (and extremely popular). THIS is the version that was buggy.

The author later went back and fixed their own buggy version.

So yes there's an argument to be made that the very first simple loop was better, but that's orthogonal to the point of the story.