Monday, May 7, 2007

while (true) break;

This is the saddest and, therefore, the most beautiful of code fragments:

while (true) {
break;
}

First it starts with the promise of forever, an infinite loop with no end in sight. And then, abruptly, rudely, and immediately, all hopes are dashed and the loop is no more. You are transported suddenly from nothing, to everything, and to nothing again.

Radiohead captured the same beauty eloquently in Nude:

Now that you found it, it's gone
Now that you feel it, you don't

It's beautiful not just because it's ephemeral (what isn't?). Rather, it's beautiful because it's destroyed just as elegantly -- in a single word, in a single line of code -- as it was created.

1 comments: (Post a Comment)

Michael Hoisie said...

Unfortunately Chung, that code will never see the light of day in any decent optimizing compiler. It's all an illusion.