Stan Lippman's BLog

C++/CLI

My Links

Blog Stats

Archives

Towards a Natural Theory of Programming Languages

My recent posting entitled A Reader Bleakly Asks About the Future of C++ has generated more than my usual run of comments – and which have run the gamut of celebrating the rebirth of C++ to mourning its passing. Rather than addressing this or that point, I thought I would use this thread as a cover for writing up some of my recent fumblings about what imo programming languages are, why most of them stop being used, and why people get so gosh darn passionate about them. I call it Towards a Natural Theory of Programming Languages towards because it is something of an outline, and natural because, well, you’ll see. Hopefully it will find some resonance with folks, or at least generate a few more comments.

 

What language did the first computer use? No, it wasn't Java or C#! Here, let's make it a multiple choice:

(1)   A binary machine code: 0110000101100100011001000000010100000111

(2)   A hexadecimal machine code: 061064064005007

(3)   An assembly language: addi 5 7

(4)   FORTRAN: 5 + 7

The surprising answer is None of the Above. Oddly enough, the idea of an independent program – let alone the idea of a programming language – was missing from the invention of the electronic computer. Rather than a stored program, cables were plugged into one configuration to calculate this equation then reconfigured to calculate a second, and so on. Certainly, this must be the origin of the term tight coupling. The original computational environment did not support the notion of software. It was hardware and largely hardwired.

 

Programs Dwell in a Computational Environment

The modern computing era began without the concept of either a program or a programming language. The immediately intractable problems were hardware: a particular daunting problem was the operational life of the vacuum tubes. Many skeptics argued that the tubes would prove too volatile to support sustained calculation. That is, that an electronic computer was not possible.

It was only after the successful demonstration of a working computer – in an analysis of its operational behavior – that the notion of a stored program arose. And this was a binary machine code rather than language. That is, the eventual introduction of the program solved the logistical bottlenecks of the pre-existing computational environment. The introduction of a stored program decoupled from the state of the machine represents the indirect origin of our profession, not the invention of the computer itself. This decoupling has only accelerated.



The Evolution of Complex Structure

Software did not begin as software. It was a hard-wired configuration – a dance without a distinct dance notation. This evolved into a reproducible program bit map that could be loaded and flushed from memory: a purely coded numeric representation. The assembler introduced a rudimentary symbolic program representation at the level of individual instructions that could be grouped by function. There was still no notion of a vocabulary but only of a code.

The invention of the programming language was both a concession and a boon to human nature – the ghost in the computational machine. It solved yet another logistical bottleneck, permitting an exponential expansion of both the computational environment and the percentage of human population devoted to its nurture.

 

 

A Natural Theory of Programming Languages

A successful programming language is always a response to a pre-existing computational environment:

(1)   it facilitates expression within a current environment – that is, it has immediate application. It competes for attention.

(2)   it improves on one or a set of existing solutions – that is, progress in a certain area is perceived to have faltered due to identifiable problems that the language demonstrably improves on.

(3)   it provides both a vocabulary and shared perspective that exhibits aspects of devotion – that is, a sense that it embodies an objective truth absent in other languages. It is not just a tool; it is a culture.

Programming languages historically come in a marketplace hierarchy – or environmental niche ...

·         FORTRAN vs. LISP        vs. ALGOL     vs. COBOL   vs. shell

·         Simula67    vs. PROLOG vs. ALGOL68 vs. PL1         vs. AWK

·         SmallTalk   vs. CLOS       vs. Ada/C++   vs. VB          vs. Perl

·         Java/CLI      vs. ML           vs. C++          vs. VB          vs. Python

 

 

 

All Languages Become Extinct

As the computational environment changes …

·         the more specialized and successful the language is within the previous computational environment, the more difficult it is for it to adapt to the new environment.

·         it fails to reproduce in the minds of the newer members of the community – that is, its population drops off.

·         dropping below a certain threshold, it no longer has the critical mass to support active development.

·         the leaders of the existing population attempt to readapt the language to the changing environment; however,

o       the historical accumulation of structure often seems to overwhelm these efforts.

o       it is as if the conditions that give rise to a language's success are intrinsic to its eventual extinction.

In general, there are far more extinct than active programming languages.

 

 

 

Programming Languages are Not Language

All programming languages address the same basic domain.

·         They differ in their vocabulary and level of detail.

·         They are more or less formal hypotheses about the environment and the programmer community that wishes to exploit that environment.

·         The success or failure of a language in that environment is the experiment. Those of use who design languages collect data and make adjustments.

·         As long as the computing environment changes, there will always be new languages and adaptations of older languages.

Anyone involved in the invention or use of a programming language functions as an advocate of that language, and is not without bias.

 

brief notes:

 

The first obvious objection to this theory, if you will, is to raise historical counter-examples: Ada Lovelace, Leibniz's universal characteristic. But none of these were actually realized, and had no telling influence at the outset of the modern computing era -- that i could tell from my superficial readings. Rather, once the invention of programming languages took root, folks combed the historical record for precedent, imo.

 

There are a number of natural language myths that bleed into assertions made about programming languages as well. Do we think in language? No, that is not the finding of current neuroscience as I understand it, albeit somewhat feebly. Does one language facilitate thought over another? Again, my understanding of the evidence is that the answer is no.

 

If you step back from our bickering over programming languages, you can't help but be astonished at how little science we put into our discussion.

posted on Wednesday, June 02, 2004 7:47 AM

Feedback

# re: Towards a Natural Theory of Programming Languages 6/2/2004 11:31 AM for( Eyes )

this part sounds specious: "They are more or less formal hypotheses about the environment and the programmer community that wishes to exploit that environment."
java/cli is clumped together in your taxonomy; the programmer community did not push for cli - perhaps one or two twisted chaps curled up in a fetal position from too much vb exposure.
it's plainly an attempt to co-opt (embrace, extend, extinguish) the ideas that worked well from java and of course eariler languages; things evolve, context matters. this(c#) is probably one of the first languages driven by the needs of the marketing and legal department. it aint even listed - does cli subsume intential programming? come on - put down the kool aid.




# re: Towards a Natural Theory of Programming Languages 6/2/2004 3:36 PM Mike Gale

I like the thrust of your argument.

A couple of points:

1) There is not a single "marketplace heirarchy". You've got the people who went from scripting (ASP) to ASPX with VB.NET, missing out on C++ and even VB6... You've got APL programmers...

2) I know languages influence what I am prepared to do. So in a sense my thinking is controlled by languages. (This annoys me intensely but I don't intend to be a language developer so it's a choice.)

3) Control is not entirely in the marketplace. MS has created two first class languages on the CLI. C# and VB.NET. Many programmers get hooked on the MS IDE, so will not use anything else. I know other languages I'd love to be in there with first class support. I'll never get them (but MS is adopting ideas and extending the languages (slowly) so the issue is addressed in some sense)!

4) Performance is a big issue. Script can be a joy after your brain leaves the computer way behind during a build. That has an impact on the "language ecology", like there is a niche for scripting (poorly filled in Windows at present, maybe Monad will address it maybe not).

5) There are sociological issues too. At present programmer is often a full time occupation. I imagine that we are seeing the rise of part time programmers. This adds code generators who are hopefully not flooding the world with too much "wizard made" code.

6) Multilingualism. In the last 24 hours I've been working in or reading VBScript, VB.NET, C#, Delphi, J and JavaScript. I'm sure this is not uncommon. What does that lead to?

# re: Towards a Natural Theory of Programming Languages 6/2/2004 3:37 PM Chris Smith

I've a couple of texts on programming language design. A dozen or so themes seem common.
Is there research on an abstract programming language that could be instantiated in the source code of an existing language?
For example, something that lets one design a class and select whether you want to see source code in, say Python, or C++?
I'm thinking that such a repository could be done with general fidelity across languages, although some features may not be readily spoofable.
A thought.

# re: Towards a Natural Theory of Programming Languages 6/2/2004 7:14 PM tomtom

Next time finish formulating your ideas before publishing. Your "article" is a waste of any reader's time, says little to nothing and shows neither regard or understanding of the history of study of programming languages.

# re: Towards a Natural Theory of Programming Languages 6/2/2004 9:55 PM Omer Zak

1. First, a bit of nitpicking.
The first "computer language" IS binary machine code. Initially, it was realized by means of cables and switches. Then, by means of input devices which read punched cards or punched paper tape.

2. I agree with Mike Gale that language influences thinking. Some languages constrain one and one's thinking. Other languages have liberating effect (such as LISP/SCHEME and Python).

3. One very important factor was not mentioned in the discussion so far: the standard libraries available with the language.

The language FORTH failed, if I am not mistaken, because people could not agree about a standard library.

Most of the power of Perl and Python comes from their libraries. Java, too, has a rich set of libraries.

I believe that the future belongs to libraries, which can work with more than one language (a good term with "multi-" or "cross-", anyone?).

# re: Towards a Natural Theory of Programming Languages 6/3/2004 6:48 PM Dobes

I also think that the survival of a language is also more an issue of libraries than of language.

I prefer Java because it has gui,threading, sockets, class loading, etc. all built in to the standard library. Since these are the primary features that differ between platforms, the majority of code can be written to depend only on these APIs, and in doing so be automatically cross platform.

C++ could push its way back into usefulness if it, too, required that all C++ implementations provided a standard API for threading, I/O, loadable modules, and user interfaces. I doubt they will - these are very difficult to implement in a language without garbage collection. Many of the issues just cannot be addressed to satisfaction for all programs.

# re: Towards a Natural Theory of Programming Languages 6/4/2004 12:52 AM Steve Merrick

<Your "article" is a waste of any reader's time...> Are these poeople turned on by their own rudeness?!! Notice they only ever criticise, never contribute. I have found this discussion interesting. Thank you.

# re: Towards a Natural Theory of Programming Languages 6/4/2004 1:49 AM anonymous

"Is there research on an abstract programming language that could be instantiated in the source code of an existing language?"

Wouldn't design patterns somewhat cover this..?

# Pleasing People, or Pleasing the Machine? 6/4/2004 8:31 AM James Britt

I didn't see any mention of language design being directed by the needs and weaknesses of the machine.

Early languages were (mostly) driven by the architecture of the computer; while these languages were an improvement for the developer, they were still largely focused on making the *computer* happy rather than the programmer.

Modern languages, such as Ruby, are crafted to be a better fit with how people think. We can afford the additional layers of abstraction because machines are fast enough to hide the longer distance from human code to machine code.

# pleasing people 6/12/2004 6:05 AM Dejin Zhao

Programming language is a interface between human and existing computing environment. Changing in computing environment is to match requirements from human. Human's thinking way seems not changing VS. changing speed of computer environment.

Design and implementation of a programming language have two requirements. One is to match current computing environment, the other is to try to match human thinking model. The first is easy to achieve since the computing environment is built by people. To define human's thinking model(data representation, the way of inference) and introduce it to programming language design is difficult.

However I think that a programming language designed to match human's thinking will last longer than the other way. As the computing environment changing, we just need to change the implementation of the language, and the language itself don't need to change because people are still prefer it's way.

# re: Towards a Natural Theory of Programming Languages 6/17/2004 9:20 AM stan lippman

re james britt: i thought it was implicit in the whole argument that languages are a response to the machine -- which i term the environment in which they compete. as time progresses (from eniac onward) languages become more abstracted from the machine -- the decoupling that i spoke of -- and the environment becomes modified by software abstract layers which are then targetted ... smalltalk is an early language that placed a runtime software layer between itself and the machine -- java targetted its virtual machine -- and the CLI object model provides a language independent runtime software layer.

i am always distressed when folks claim, such as Mr. Britt and Mr. Zhao, that this or that language `better fits how people think' -- that is actually one of the few remaining mysteries of scientific enquiry -- what they tend to mean instead is something considerably less splendid -- that modern languages over time model higher levels of abstraction.

however, these are all useful points, and i appreciate people taking the time to join in a discussion.

if people choose to make claims about how people think, and that this or that language is closer to human modes of thought, i suggest that they read up on neuroscience ... c. koch's text, the quest for consciousness, is a useful introduction. the cognitive neuroscience of memory, an introduction, by H. Eichenbaum, is also an excellent text -- it summarizes in detail the current understanding of how memory works on a molecular level within the brain. authors you might wish to look at are (a) gerald edelman, (b) eric kandel -- both nobel prize winners, (c) joseph le doux, and (d) a. damasio, in particular descartes' error.

# re: Towards a Natural Theory of Programming Languages 6/17/2004 9:39 AM stan lippman

omar zak makes the following points:
1. the first computer language is binary code.
this is actually not true. the eniac performed its arithmetic operations on numbers represented in terms of the ten decimal digits -- as quoted by Martin Davis in his "The Universal Computer" -- there are more detailed descriptions in other texts. i think omar is extrapolating from what exits now into presuming how things originated. however, von Neumann did not become involved until after an operational eniac.

2. I agree with Mike Gale that language influences thinking. Some languages constrain one and one's thinking. Other languages have liberating effect (such as LISP/SCHEME and Python).

well, again, there is no real basis for saying this -- we don't know that. the german poet rilke once complained to paul valery that the german language had no word for the back of the hand, and he was effecting the same sort of belief as Mike Gale. in terms of natural language, the problem with this statement -- that language influences thinking -- is that it often leads to racist characterizations whereas recent linguistic studies show that all languages are equally complex and their peoples are equally intelligent, but that the languages tend to reflect -- and here i am extrapolating -- the environment in which they are spoken. one of the problems of modern life is that we are all specialists and tend to be very uninformed about the current understanding of fields outside of our own -- who has time, right? but linguists have looked at these sorts of statements with rigor and across many cultures. People that understand a language and use it to survive in their environment are not handicapped because there is no word for the back of the hand.

# re: Towards a Natural Theory of Programming Languages 6/17/2004 10:01 AM stan lippman

in another posting, mike gale says,
1. There is not a single 'marketplace heirarchy'.

The programming communities were once much more separate than today -- in large part because of the ubiguity of computers today which is really mind-boggling -- i began writing cobol programs on an ibm/360 back in the 1970s ... you know, the back in my days ...
and through the mid-1980s, there was a real separation of programmer communities and languages -- and it was hierarchical ... this is much much less the case now. IBM probably started that with PL/1, which attempted to unite COBOL and FORTRAN communities, i believe -- and the reaction to a highly complex language led to more general type defining facilities. that said, there are certains tasks for which certain languages are well-suited -- well, even tailored, and great effort is put on dislodging them by competitors. We did that: C++, a better C. Eiffel use to take an ad out in C++ Report when i was editor that said, Why Settle for a C when you can have an A. I thought that was clever, although again what is implicit is that C++ programmers are dumber than those using Eiffel -- which is in a sense elitist. The Algol folks calling FORTRAN graffitti written on a bathroom wall. Although they later claimed never to have said that. I like bringing up old language spats because we see now that it holds no large significance. Richard Gabriel likened C programmers to an unwashed horde in an article in JOOP magazine. Basically, the problem with claiming that languages determine your thinking is that it ends up allowing you to claim that a group of people are not thinking, are dangerous in their stupid activities and are best eliminated.

# Garbage collection as a crippling mental weakness. 7/11/2004 8:54 PM Nathan Myers

I grew up among users of a natural language that was aggressively hostile to abstract thought. Any attempt to add to its vocabulary, or mention by reference anything not in its vocabulary, was met with ridicule or violence. (Of course the ridicule and violence came not from the language, but from its user community.) The result was that users depended very heavily on what is usually described as "shared understanding", so that most nouns could be replaced by a euphemistic pronoun "da kine". Since few things were culturally allowed to be said, it didn't take much specificity to get what was said understood.

The language was what is called "Hawaiian pidgin", technically not a pidgin but a creole language, a language that adopts its base vocabulary from one or several parent languages, but evolves a grammar that happens to match in many details those of other, unrelated, creole languages.

It always amuses me that Lisp advogates (and their sectarians, such as Python fans) claim for their language greater expressiveness than (e.g.) C++. They react with almost the same emotional violence as a Hawaiian blala to mention of conceptual limitations of their language. Mention that C++, for example, is _uniquely_ capable of expressing encapsulation of resource management is always met with anger, derision, or an attempt to change the subject.

The mere presence of garbage collection seems to suffice to make a language incapable of expressing encapsulated resource management. As such (and more especially considering it has been years since I was obliged to code a "delete" statement in C++), automated garbage collection comes at a very high cost: besides weakening otherwise powerful languages, it weakens in crucial ways the thinking of those languages' users.

# In Principio &raquo; Towards a Natural Theory of Programming Languages 7/12/2004 1:16 AM Pingback/TrackBack

In Principio &raquo; Towards a Natural Theory of Programming Languages

# re: Towards a Natural Theory of Programming Languages 7/30/2004 5:52 AM 我的地盘

What language did the first computer use?

# re: Towards a Natural Theory of Programming Languages 8/9/2004 9:13 PM stan lippman

hi, nathan. it is always a pleasure to hear from you.

actually, you know, there is no research in neuroscience or molecular biology to back up your claim that garbage collection is a crippling mental weakness, but other than that, i enjoyed your post ...

hope you are doing well with yourself ... nathan was the first person who explained type traits to me ... he wrote an article on it for the c++ report. he also worked if memory serves on a memory pooling library for rogue wave ... umm.

good to hear from you, nathan. your post got lost in a deluge of mail, and probably my mind has weakened from inhaling the cli heap vapors. take care.


stan

Comments on this post are closed
Privacy | Terms of use