Skip to content

Instantly share code, notes, and snippets.

@makefu
Last active December 15, 2015 20:29
Show Gist options
  • Save makefu/5319303 to your computer and use it in GitHub Desktop.
Save makefu/5319303 to your computer and use it in GitHub Desktop.
Mirror of http://web.media.mit.edu/~pliam/res/blog_1.html Thanks Steven Pliam!
Is HTML a programming language?
It appears that many of you are cock sure about what you think a
programming language is. Some of you are so certain about it that you are
even willing to call others stupid merely for asking this question. Well
perhaps I can help deflate some of that arrogance. I have to commend the
people who are asking this question about HTML, because you have good
reason to. There is a more fundamental question here which clearly confuses
many folks including even students of computer science; and that is "What
is a programming language?" If you think that this is a simple question to
answer, or one that your index finger can resolve by pointing somewhere
inside a dictionary or textbook, then you are definitely mistaken, if not
unfortunately misled.
Most of us know that it has been published over and over that "HTML is a
mark-up language, not a programming language." Of course, we have plenty of
textbook definitions and references telling us what these things mean. That
is apparently why so many feel that they have the authority to call others
who question the idea stupid or uninformed. The problem is, as any truly
educated person knows, not all knowledge can be boiled down to a simple or
clean taxonomy. And so many authors feel the need to be authoritative about
such a basic question. But if you really begin to scrutinize most of these
definitions, it doesn't take long before you find inconsistencies that
don't stand to good reason. This is primarily because there is almost
nothing that one can actually say about familiar programming languages
which would be common to all of them, other than the most general,
distilled notions. And I am talking about programming languages, which by
broad consensus are considered as such. For example, you can make the
generalization that when you program something, you are communicating a
plan for how the thing should behave in the future. And the means by which
you are communicating that plan might be considered a programming
language. Although whether you are programming a person, society, or a
machine, the means that you use to do that could be some kind of formal
behavior, politics, media, psychological stimulus, or code. Most linguists
would agree that if you are using any formal system of symbols or
codification to communicate such a plan, then you are using a language.
Unfortunately (or fortunately), there is not much else that one can really
say about all programming languages which would lead us to a concrete
definition that we can hang on to securely. Certainly, there is nothing in
the way of syntax, symbolic elements, or semantic structures which are
common to all. Therefore, does it not become a kind of arbitrary and
pointless exercise to use highly specific terms in trying to define what a
programming language is? Anything that you come up with will have
inconsistencies. In my opinion, the people who want to latch on to concrete
but arbitrary definitions do not really understand one of the most
essential ideas in computer science: abstraction. There could hardly be a
more important concept in the entire discipline. Like computation itself,
programming languages exist at different levels of abstraction. For
example, you might talk about the necessity for certain conditional or
iterative structures, like an IF-Then statement or a For-Each loop, to
exist in order for a language to qualify as a programming language. But
these constructs merely exist at a certain level of abstraction. If you
consider languages at a lower level, they don't exist. A program written in
Assembly Language may contain a 'jump' type statement, but the programmer
would have to write some lines of code to implement something as complex as
an If-Then statement, abstracting such a construct from its detailed
implementation.
Now if you are using machine language (lowest level of abstraction), then
everything requires implementation except for the basic instruction set of
the processor. All you have to work with at that level are binary codes
which you store in a list and feed to a processor; no logical, no
iterative, no conditional constructs are there for you. It all has to be
implemented. Such familiar structures, as they exist in mid-level
languages, are explicit. However, they don't cease to exist at higher
levels of abstraction like, for example, in HTML or even the dialogue boxes
that you use to set preferences in an application like MS Word. They are
present; but they exist implicitly. Consider the anchor element <a></a>
used with the "href=" attribute in HTML which you use to 'program' a link
in your document. [If] a user clicks here [Then] go to this external URL.
There is logic, iteration, and conditional behavior working implicitly
underneath HTML. But it is simply the level of abstraction that exposes or
hides the details of these structures and processes. It doesn't mean that
they are not present. After all, why the hell deal with them if you don't
have to!
"Are you saying that everything you do on a computer is programming?" you
might ask. No. I am not saying that. But I am saying that the distinction
between running a computer and programming one becomes increasingly
nebulous as we advance to higher levels of abstraction. If you are just
entering data into a system (text into a word processor) or processing an
image with some kind of filter, then you are not really doing anything
substantial to set the future behavior of the machine for the express
purpose of doing some work. That is not programming. However, if you are
configuring an application by setting its preferences, or an operating
system by manipulating its system files, or a webpage by marking up its
text with HTML, anything that will set up the future behavior of the
computer to accomplish something for you, then these are activities that
are so closely akin to anything essential that can be said about what
programming is, that I no longer see the point in trying to forge a
distinction. And the abstracted elements that you are working with, whether
it is text, dialogue boxes, or HTML, will constitute the programming
language which you use.
One thing which is important to understand is that computation and its
methods always continue to evolve. How we program a computer is not
something that remains static. We are moving constantly toward higher
abstractions, dealing with lower level implementations less and less as our
programming languages evolve. Harold Abelson and Gerald Sussman, two of the
most important and influential computer scientists in history, talk about
something that they call "metalinguistic abstraction." They ask us to
reconsider what it means to be a programmer, that programmers are actually
designers of language rather than just users of existing languages. In
essence, in order to fully exploit the power of abstraction, programmers
need to transcend the limitations of the current language in which they
work by inventing new linguistic abstractions. Eventually, this may
culminate in the ability to create any kind of complex software with
natural language. The programming interface will become a sophisticated
interpreter, an evaluator that will instruct the computer to compile and
manufacture software to deal with practically anything that we can imagine.
This indeed would be high level abstraction. Our programming language would
become… well, just language! Would it not?
So yes. Absolutely! HTML is a programming language and a pretty powerful
one. I just would not call it a general programming language. It is a
mark-up language too; so what? It has many primitive elements, a means to
combine those elements, and to some extent, even the means to create
abstractions by naming combinations of elements, all of which are commonly
understood as requirements for a powerful programming language. Max/MSP is
another example of a programming language designed for a more specific
domain; it uses a graphical language which allows the programmer to connect
icons in all kinds of interesting ways. Like HTML, it exists at a higher
level of abstraction and does not offer the conventional text-based
conditional and iterative statements. Again those constructs are implicit
within the graphical abstractions of the language. If you tell the folks at
Cycling'74 that Max/MSP is not a programming language, they will laugh at
you, as would I. So regardless of what you might have read or heard in the
industry, if your own education and thinking has you convinced beyond any
doubt that HTML is not a programming language, then I suggest that you keep
reading. Go get some more education at an institution other than a
glorified vocational training center. You have more to learn. If you want
my suggestion on where to start, read this book. It's not an easy one; but
it is arguably the most important textbook ever written on the essence and
fundamentals of computer science. It certainly has something to say about
what a programming language is. But in a word, this is a book about
abstraction.
I can just barely remember a time (several decades ago) when there were
many arrogant computer programmers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment