Reading through the "solution" a few above which had been proposed by "a blog" got me frightened for the future of humanity. About to go on a "... and that's why I hate blogs" rant, I figured I should take a look at the offending blog itself before ripping into it. It's a good think I checked, because as it turns out it is the reader who posted the solution into this thread who should be sent to Siberia, not the blog author, because the title of the article from which that "solution" was taken is "A Quick Lesson in Overengineering".
If this was a thread about "fun solutions", "goofy solutions", or just "who can make the most unusual sandwich" alarm bells wouldn't be sounding, but if most of the people on this thread think these are good solutions perhaps it is time to make the tent a little bit smaller. Right now, anyone who has read this far is thinking it might be time for me to loosen my tie a smidge, but not so fast.
I see "solutions" like this crap find their way into production code, too often. Code that looks like it was the winner in an Obfuscation Contest, code that throws off objects like its the Octomom. This is not what code should be.
Code has two purposes, and only two purposes:
Purpose 1: Communicate with other people.
Purpose 2: Communicate with a machine.
Anything else that code "should do" either fits into one of those categories, or it isn't valid.
If you go back through the various solutions proposed to this intense overwhelmingly difficult problem (iterating over the alphabet) you should immediately realize that all but two of the solutions are crap. Now, don't get me wrong, that doesn't mean the other two solutions are any good; that all depends.
The two "good" solutions may also be crap, depending on the real problem. If the problem is to iterate over an "arbitrary" alphabet in the natural order for that alphabet, then none of these solutions come at all close, and this is why you should be gathering your children together and getting read for the coming apocolypse.
Instead of asking "what do you mean -- exactly" of the original poster, everyone starts throwing bizarre solutions to a problem that is either underspecified, or is so maddeningly simple that it doesn't deserve a thread of its own, much less the collection of motly drug induced solutions that it inspired.
You're all fired.