My favourite facet of modern programming language is the obscure, mysterious ternary conditional statement. It compresses unsightly code into a tightly packed line of even more unsightly code. Yet, somehow the end result is graceful and stunning.
The lame way: ((What an excellent excuse to introduce a killer feature of the new blog: GeSHi-based automatic code formatting!))
[code lang="php"] if ($A || $B || !$A * $something) echo 'Hot dogs!'; else echo 'Hamburgers!'; [/code]
The real man’s way: ((This attempt to introduce automatic footnoting of my posts, meanwhile, is weak at best. To hell with it! I’m just glad to be rid of the practise of writing [1], [2]… after sentences.))
[code lang="php"] echo ($A || $B || !$A * $something) ? 'Hot dogs!' : 'Hamburgers!';[/code]
Its greatness lies not in its ability to squish code, but in driving other people nuts. Few know of its existence; fewer actually apply it. To the rest of the world, it is a string of random characters that somehow spits out the right content.
Now if only I could apply <script language=”COBOL”> to my web pages…