Skip to main content

Computer Languages Change - Like Spoken Languages

Are computer languages inherently "artificial" and "pure" — either like Esperanto or a dead language, such as Latin? Or, are computer languages as much "living" as spoken languages?

Understand, I am not considering low-level assemblers or "dead" computer languages that exist in virtual museums (and yes, there are tech archives to explore). I mean the languages that are in wide enough use that programmers develop attachments to them and vocally argue about their futures.

In spoken languages, some people are purists. These experts like to "prescribe" grammars and the meanings of words, insisting on a rigid approach to a language. By comparison, some scholars of language as "descriptive" researchers, trying to document a language's evolution. Most scholars, however, are a bit of both — we try to prescribe dominant rules, while accepting change will happen.

The French try desperately to maintain an official "French" language. That's the same as having an ISO committee oversee a programming language. Yet, neither seems to work as well as intended.

The following is a rough metaphor, so please don't nit-pick at my generalities…

Many, if not most, computer languages are extensible; you can add to the language via macros, function libraries, and other means. Some languages can even be extended via other languages! (Tech trivia: The most common language for extending other languages is C.)

Eventually, the "language" as known by programmers includes libraries, plug-ins, and frameworks. We tend to forget where the core language ends and the extensions begin. Take Apple's Objective-C as an example. The Cocoa frameworks (actually several frameworks) are so integral to development that most people use "Objective-C" and "Cocoa" interchangeably. Objective-C is really a small language that doesn't do much by itself. Technically, we could state that Objective-C is C, with optional object-oriented extensions. Objective-C is a branch of the "C family tree" reflecting the ideas some programmers had about improving C.

Even in "old" traditional C, the standard I/O and math libraries have blurred with the language, too. Everyone considers the function __ strcopy(variable, text) __ part of C but it isn't — it is a library function. One of my complaints about C is that strings were an afterthought in most older languages, and it shows. Still, the language evolved because over time the importance of dealing with textual data started to rival the value of number crunching.

Most languages end up being changed not by the purists with computer science degrees, those original compiler creators with special skills. Instead, the daily users of the languages alter and extend languages to get work done. Sometimes, the compilers are altered to reflect these pressures, and the "common usage" becomes an acceptable usage, much like spoken language. This has been problematic in scripting languages, and I challenge anyone to explain the mess that is PHP.

For another example of computer languages changing like spoken languages, consider good old-fashioned BASIC. There is a standard, but even by the mid-1980s there were countless dialects (GW-BASIC, Commodore BASIC, Atari BASIC, et cetera.) Even today, we have branches from the original BASIC that, unless you know their heritages, would be as difficult to trace backwards to BASIC as English is to trace back to Western Germanic languages. English has taken words and grammar from dozens of sources, and BASIC dialects have done the same.

Elements of C and Pascal, among others, have entered BASIC. PowerBASIC, Visual Basic (and VBA, VB.Net), PureBASIC, BlitzMax, and Real Studio (formerly REALbasic). In the case of PowerBASIC, the users kept adding functions using inline assembly code, so Bob Zale modified the compiler to keep up with what people were doing! The PowerBASIC language incorporated the elements coders were hacking into the language.

A common task in the old days was "page copying" a screen to simulate visual effects. Most of us hand-coded assembly programs and linked those into our programs. However, both QuickBASIC and PowerBASIC eventually relented and added the function __ pcopy z, y __ directly within the compiler. The users changed the language.

The world of programmers is small, granted, and the number of compiler experts even smaller. But, most "normal people" don't add to dictionaries, either. A word becomes common, like a function becomes common, and eventually someone in "power" adopts the word or tries to reject it. Much of this depends on how close you are to that community that argues about what to add or not add to a language.

A more current example of language evolution can be found in HTML 5, which incorporated "div" (division) tags people were using with some regularity. These div tags, such as "Article," become stand-alone tags in HTML 5; they are no longer simple named divisions on the page. We now have page elements not because the parser creators wanted them, but because so many designers were using CSS to construct libraries of common page divisions. The previous markup <div id="article"> has become <article> because that is the way users, not HTML parser developers, wanted it.

There remains an active debate between the XHTML supporters, of which I am one, and the HTML supporters. I prefer the rigid grammar of XHTML, which prevents structural errors — but the masses won out and we don't need closing tags for all elements. Why? Because languages seem to drift towards simplicity, losing complex grammar elements over time. (I compare this to the loss of "whom" and the use of "their" for "his or her" in common speech.)

As you can probably tell, I give this too much thought.

Comments

  1. The evolution of Objective-C over the last decade is another object lesson along these lines. There were standards enforced by the the community gestalt, such as the getter/setter nomenclature and behavior, and then those got baked into the compiler as properties. Similarly with ARC - the majority of the programmers out there played by the same rules (which in many communities would be impossible - imagine something that depended on standardized nomenclature working in the straight-C community) which allowed some tedious work to be moved into the compiler.

    ReplyDelete

Post a Comment

Popular posts from this blog

Comic Sans Is (Generally) Lousy: Letters and Reading Challenges

Specimen of the typeface Comic Sans. (Photo credit: Wikipedia) Personally, I support everyone being able to type and read in whatever typefaces individuals prefer. If you like Comic Sans, then change the font while you type or read online content. If you like Helvetica, use that.

The digital world is not print. You can change typefaces. You can change their sizes. You can change colors. There is no reason to argue over what you use to type or to read as long as I can use typefaces that I like.

Now, as a design researcher? I'll tell you that type matters a lot to both the biological act of reading and the psychological act of constructing meaning. Statistically, there are "better" and "worse" type for conveying messages. There are also typefaces that are more legible and more readable. Sometimes, legibility does not help readability, either, as a type with overly distinct letters (legibility) can hinder word shapes and decoding (readability).

One of the co…

Let’s Make a Movie: Digital Filmmaking on a Budget

Film camera collection. (Photo credit: Wikipedia) Visalia Direct: Virtual Valley
June 5, 2015 Deadline
July 2015 Issue

Every weekend a small group of filmmakers I know make at least one three-minute movie and share the short film on their YouTube channel, 3X7 Films.

Inspired by the 48-Hour Film Project (48hourfilm.com), my colleagues started to joke about entering a 48-hour contest each month. Someone suggested that it might be possible to make a three-minute movie every week. Soon, 3X7 Films was launched as a Facebook group and members started to assemble teams to make movies.

The 48-Hour Film Project, also known as 48HFP, launched in 2001 by Mark Ruppert. He convinced some colleagues in Washington, D.C., that they could make a movie in 48 hours. The idea became a friendly competition. Fifteen years later, 48HFP is an international phenomenon, with competitions in cities around the world. Regional winners compete in national and international festivals.

On a Friday night, teams gathe…

Edutainment: Move Beyond Entertaining, to Learning

A drawing made in Tux Paint using various brushes and the Paint tool. (Photo credit: Wikipedia) Visalia Direct: Virtual Valley
November 2, 2015 Deadline
December 2015 Issue

Randomly clicking on letters, the young boy I was watching play an educational game “won” each level. He paid no attention to the letters themselves. His focus was on the dancing aliens at the end of each alphabet invasion.

Situations like this occur in classrooms and homes every day. Technology appeals to parents, politicians and some educators as a path towards more effective teaching. We often bring technology into our schools and homes, imagining the latest gadgets and software will magically transfer skills and information to our children.

This school year, I left teaching business communications to return to my doctoral specialty in education, technology and language development. As a board member of an autism-related charity, I speak to groups on how technology both helps and hinders special education. Busin…