Thursday, August 03, 2006

The Kingdom of Nouns

A lovely little tale about different stylistic conventions in computer languages, focusing on the Kingdom of Nouns (Java).

In the Kingdom of Javaland, where King Java rules with a silicon fist, people aren't allowed to think the way you and I do. In Javaland, you see, nouns are very important, by order of the King himself. [...]

In Javaland, by King Java's royal decree, Verbs are owned by Nouns. But they're not mere pets; no, Verbs in Javaland perform all the chores and manual labor in the entire kingdom. They are, in effect, the kingdom's slaves, or at very least the serfs and indentured servants. The residents of Javaland are quite content with this situation, and are indeed scarcely aware that things could be any different.

Verbs in Javaland are responsible for all the work, but as they are held in contempt by all, no Verb is ever permitted to wander about freely. If a Verb is to be seen in public at all, it must be escorted at all times by a Noun.

Of course "escort", being a Verb itself, is hardly allowed to run around naked; one must procure a VerbEscorter to facilitate the escorting. But what about "procure" and "facilitate?" As it happens, Facilitators and Procurers are both rather important Nouns whose job is is the chaperonement of the lowly Verbs "facilitate" and "procure", via Facilitation and Procurement, respectively.

Alas, many of the idiots programmers commenting on the post miss the point of the tale, which is not that Java isn't English. Nor is it that Object Oriented design is a bad thing (although, OO is merely one means to a greater end, namely information hiding). The point is that Java's type system forces people to create classes solely for the purpose of carrying functions about, often to an absurdly exaggerated degree.

The question of nouns and verbs (data and functions) is important for programmers, as this article by Joel Spolsky explains.

No comments: