(originally posted here on 08 Jul 2005)
You know you want it.
The data starts dumb: a piece of
plain text or a configuration file ending in .rc, .properties, or .ini.
They are only simple lists with the most basic form of structure; the
name/value pair. But that trivial step begins the enrichment process.
Special sectioning codes may then be added. Perhaps comments are
introduced to allow authors to enter notes to each other which the
parser ignores. If the size of the document grows large enough, and
values are repeated, the humans editing them get sick of using search
and replace, and the specification expands to include some sort of
variable. Once variables exist, it’s a short step to try to use them
for conditionality so sections of the document are activated only if a
variable is set to a certain value. Inclusions seem reasonable to
support, allowing common functionality to be separated into commonly
invoked files instead of requiring that each file stand independently.
Further
usage will be eased by introducing looping mechanisms to eliminate the
pointless repetition of large sections of content that differ slightly
or not at all. And once loops are available, one already has a simple
scripting language. At this point the pretense of the declarative
format is dropped, and efforts to add power to the language are
regarded as improvements. It might start to distinguish text from
numbers, it might gain access to network or Operating System features.
If
the new format is taken seriously, larger projects are created and
require maintenance. The solutions depend on the era: the goto command
could be censored for the ideal of Structural Programming, code could
be isolated in objects that model real-world things, or, concerns could
be isolated into interwoven aspects. Now this format — which began as a
configuration file format — is a real programming language.
Perhaps
no single entity has made the entire journey from properties file
format to programming language, but there is a constant pressure
towards greater expressive power. Real languages have evolved from
rather humble beginnings. Macro lists for IRC clients have become
scripting languages capable of authoring 200K applications. Microsoft
Word’s scripting language only needed to introduce some small
intelligence into text documents, but ended up as a layer with the
capacity to support viruses. Linux firewall configuration files already
support variables and simple execution flow control.
There are
only two forces pushing in the opposite direction. With added power
comes added complexity, and many scripting and programming languages
are beyond the capability of the uninitiated. And, more complex
languages often require processing steps between source and executable.
But these are the only reasons. The final encoding for any information is a real programming language.
The most advanced and general way to report the number “5″ is to cut to
the chase past all intermediate stations and implement a method, in an
object oriented language, which returns the integer value of 5.
“5″ wants to be code, and ultimately it will.