The World's Most Maintainable Programming Language: Part 1

by chromatic

Have modern programming languages failed? From the point of view of learnability and maintainability, yes! What would a truly maintainable and learnable programming language look like? This is the first of a six-part series exploring the future of programming languages (read The World's Most Maintainable Programming Language: Part 2, The World's Most Maintainable Programming Language: Part 3, The World's Most Maintainable Programming Language: Part 4, The World's Most Maintainable Programming Language: Part 5, and The World's Mode Maintainable Programing Language: Conclusion).


2006-04-03 04:08:54
Can/Should natural language be compared to computer language? The analogy of being understand articles from various publications but not understand programs from various pragrammers seems unhelpful to me. For sure we can understand the syntax of both and in this case the computer language will be far simpler. To understand the semantics, natural language may seem easier but it is providing a vague and subjective message. If you needed to provide an exact set of instructions in a natural language the result may well be hugely verbose and consequently as or more difficult to understand than a computer program.

With regard to banning mathematical symbols, these provide an example of how syntax can be meaningful across natural language boundaries. There is far less room for abuse of maths symbols than for natural language. In fact, mathematical syntax could be viewed as a sucessful 'esperanto' equivalent covering a subsection of our communication needs. If only it could be extended to cover a whole natural language.

2006-04-03 04:27:56
Why would learnability be the most important aspect? I'd guess the real judgement should start *after* I've learnt the language!
2006-04-03 13:59:45
errwa, I actually agree completely. The weird insistence on equating learnability with maintainability drives me crazy.
2006-04-03 23:56:56
If the ultimate goal is to "produce a language in which it is impossible to write a program that a novice will not understand", then I think it is doomed to failure. Even with English we have proficiency exams to test students' abilities to comprehend the written word. And too often the kids fail to pass. So where do we draw the line, then? Are we saying that someone with a high school diploma should be able to comprehend this programming language, or should it be a college educated person?

I think Ben made some valid points about math and the structure that it provides the user.

2006-04-04 19:16:45
True power in a language would never be simple. An off beat example: would you expect a four year old to make sense of a board meeting? You talk about Python being close to your standard but I've been playing with language for years (on my own) and still consider myself inexperienced.
2006-04-04 21:31:04
Which "spoken" language does a computer programmer need to learn in a new work environment? I'm not aware of any. However, I can think of countless other professions where a new vocabulary set needs to be learned in order to perform one's duties. Take, for example, automobile mechanics. Leaving out any computerization of the vehicle, the mechanic needs to learn the names of hundreds of parts, and their interactions, as well as hundreds of different of tools.

The premise of this article, that programming and program maintenance are hard because the languages are hard, is fallacious. Programming isn’t hard because the language is unfamiliar. Programming is hard because it requires human beings to pay close attention to what they (the humans) are doing, while being creative. Languages that support tools like bounds checking and garbage collection can make programming simpler, as they reduce the number of things the programmer has to pay attention to, but nothing can remove the responsibility from the programmer for making sure:

  • A . He/she knows exactly what the program is supposed to do.
  • B. The instructions he/she is giving the computer will actually cause it to do the intended action.
  • C. He/she committed a programming mistake (off by 1 index, array overrun, etc.).

    In my experience, it’s the failure to get A correct that leads to the vast majority of maintenance issues. Either the requirements were too vague, or the programmer didn’t understand them. In either case, the problem was with natural language, not the programming language. B and C are usually the result of inexperience or simply sloppiness. A lot of work has gone into making languages make up for C (garbage collecting, etc.), but nothing about a language can make a programmer less careless or more experienced.
  • Ken Boucher
    2006-04-05 08:11:51
    If "the language must resemble human language as far as possible" which human language should it resemble? I've worked in a smalltalk enviroment with people who grew up in Vietnam, China, Russia, India, Morocco, and Jamica. Which of their native languages should this new programming language resemble? It's not like these languages are alike in their basic structure.

    And if we're thinking "English" as the language of choice, I'll admit that I have a much harder time diagraming an English sentance than I do explaining a line of Smalltalk code. I can't see how making Smalltalk more like English would be of any advantage at all, especially to my co-workers. It definately wouldn't be beneficial to me.

    For example, see "diagraming the sentace 'See spot run"' at

    2006-04-05 08:40:33
    Lawmaking uses "natural language".
    Now look how complex and difficult to understand ALL laws are. You still need a lawyer just to understand them. And a team of very smart people to create them.
    Making programs look like laws will be a desaster.
    2006-04-05 10:44:55
    Maintainability is indeed the most important code quality (more important than correctness - see McConnell's Code Complete) - and so language support for maintainability is a Good Thing. But that has nothing obvious to do with ease of learning.

    We spend a relatively short time learning a language and a lot of time using it. So optimizing for learnability is just bad practice. Language support for programming by contract, modularity, testability, having a language that uses a proper subset of the ASCII characters (sorry PERL), good idiomatic conventions so that the same thing tends to get done the same way (sorry again) - these things all matter more. (Most important of all is perhaps expressiveness - the ability to make the code say what it means.)

    The point about Legal English is spot on. Complexity cannot be destroyed. It can be illuminated and untangled, and it can be shifted around - into libraries, language constructs and the OS. But at some point someone has to understand the problem - and if the problem is complex then so is the solution.

    2006-04-06 00:47:29
    If the ultimate goal is to "produce a language in which it is impossible to write a program that a novice will not understand", then I think it is doomed to immediate success. The simplest possible grammar, to wit:

    is also the only possible grammar that meets this constraint. One will write one's program in a trice, freeing one's time for adding the text that documents, not so much what it does or how (for that too is already written), but how it meets the customer's requirements and, generally, increases the overall fitness of the world. It has the further advantage of embeddability and modeless documentation, in that whereever you look in the document, the code you wish to examine is there. It is consistent, simple, and enforces good programming practice; as to comprehension and power, I would point out its efficiency in achieving, with the least effort, absolutely anything truly worth doing.

    2006-04-07 17:39:15
    Uh. Easily learnable. Not OO. Natural language. Limited mathematical Constructs.

    Something's beginning to smell like COBOL in here.

    2006-04-09 09:46:11
    Yup, COBOL is real easy to learn. COBOL and DB2. Could teach a monkey to code.
    2006-04-11 03:55:24
    Absolutely I agree with the view that we should have programming languages getting as easier as possible to learn. At least such a kind of lauguage is necessary and usful for using PC as a thinking agent. Professional programmer use their dialects and PC users use their dialects to communicate with the same machine.
    2006-04-11 06:07:56
    I just can say no. Languages should not be easy to learn. Easy to learn is a nice addon, but it isn't the most important thing by far. Much much more important its, that the language can be used to express the things that it needs to express understandably and efficiently and clearly. And natural language is IS NOT fit for that. If you want to be precise and consitent and logical with natural language, you end up in law texts. And those are basically ubreadable and noone would do this to himself (e.g. reading them) unles he absolutely has to (for a job etc.) Also should be added, that the (widely used) languages that try to allude most to the natural language (of English that is), e.g. COBOL and SQL, are the most ugly syntax explosions around an maintaing them is a punishment.
    No, considering that you spend far more time and effort, and have to potentially do things where lifes depend on it with a language, the most important thing is how the language can be used. You won't send someone on critical diplomatic missions if the someone doesn't know the language and the culture of the country (well, Americans probably would). So the criterium isn't how easy an novice can have a little glimpse of what is going on, but how effciently an expert of the domain and of the language can work with it. Computer programs are complex. Inherently. Since they implentent (and often define) complex concepts. Mathematical notations were introduced because it is EASIER to handle mathematical concepts that way, instead of using natural language. There are a lot of concepts where natural language is just not fit to express them (for example relativistic and quantum concepts and dependencies are virtually impossible to describe in natural language, that's the very reason all the math is needed there). Trying to aling a language to natural language severely limits a computer language. What acomputer language should do is:
    Give the possibility to use and combine a lot of different concepts of expression. Give the choice on what concepts to actually use and hide the the others while doing so. Allow the programmer to chose how mcuh control he wants on the machine and the algorithms and structure. The language should grow with the ability of the one that uses it. That is actually almost the only feature of a natural language a computer language should have. If you are Shakespeare, write for tha ages. If you you are Paris Hilton say "That's hot."
    Sean H. Worthington
    2006-04-17 15:30:50
    So many languages have been created without any thought of the people who must learn, teach and use them. Something is definitly needed here.
    The Osmosian Order
    2006-05-15 22:18:04
    Check out our website for a programming language that "resemble[s] buman language as far as possible": Our Plain English development system includes an elegant interface, a simplified file manager, a sleek text editor, a robust page-layout facility, and our compiler/linker that produces native-code Windows executables - all written in Plain English, and capable of recompiling itself in less than 3 seconds.
    2006-05-17 22:48:31
    This approach is the philosophy behind BASIC, COBOL and Excel, in so far as Excel is a programming language. But software engineering principles apply to software wherever it is developed and in every language.
    I think this approach gains for immediate results but loses in the longterm because the language gets in the way of doing more complex things accurately.

    You also remark that it is strange to have to learn a new language to get productive. But a programming language is not like a spoken language. It is more like a tool or a technology. Compare the tools used in other forms of engineering.

    2006-09-28 07:37:16
    I would like to add the numbers one and two and multiply that quantity by a variable we'll call "unknown". I'll then take what results and divide by three unknowns multiplied by three unknows. The result is a third of an unknown.

    Hmm. Is this really what we would call an improvement? Learn symbols, logic, and syntax and learn to love it. I see all of this talk about making programming more like natural language as absolutely silly and ignorant.

    2006-09-28 14:10:59
    "To enforce learnability, the language must resemble human language as far as possible. This means refusing to add the jargons and idioms of existing programming contexts..."

    I stopped reading here.

    Have you considered the possibility that a programming language can be made a better vehicle for describing processes than "human languages" are? General programming languages can't be designed with just the novice in mind. They need to be designed for, well, programming. This implies introducing concepts that are awkward to express in human language, or using terms that are ambiguous in everyday speech, like we have done in mathematics. Part of learning to program is learning to think in the programming language.

    Oh, I just noticed this little gem: "The ultimate goal, of course, is to produce a language in which it is impossible to write a program that a novice will not understand". That's rich. You realise that programming includes nontrivial problems, don't you? You can't expect some random guy to understand real code, no matter which language it's coded in.

    Carl Gundel
    2006-11-08 11:11:00
    If Smalltalk has failed as a teaching language, it's only because people stopped using it to teach. It is the educational establishment which has failed because they choose tools and mediums which they perceive to be "safe" as in popular, and not because these tools are good choices. Take for example the phenomenal success of Java in schools. By success I mean ubiquity, but not effectiveness for learning anything useful. When I spoke to the computer science instructor at my local high school a few weeks ago he beamed that he was using Java to teach programming. He also seemed completely unashamed (and maybe clueless?) that by year's end he would probably not even be able to teach the students enough Java to do anything useful. He told me that by the end of the course he would try to reach the section in the materials that explained methods!!!??? How does he expect his students to learn anything at all? Granted, Java is a very heavy language that requires one to learn an awful lot before useful things can be done with it. It's pretty obvious that this is a bad choice for neophyte programmers. Better to teach a handful of important principles than a whole book of noisy language syntax. He should use something very simple and interactive. I mean come on, and old fashioned BASIC interpreter would be a better choice. At least then he could craft some fun lessons. Programming should be enjoyable or else the students will feel like they're being punished.

    To swing the other way, English does not require the user to know anything about programming. There is the rub. English is not a programming language at all, and there is no way to make it one unless you create idioms and vocabulary expressly for instructing a computer. Once you do this, it is no longer English.

    There is a balance to be struck. Languages like Smalltalk do succeed in achieving that balance, more or less.

    It's pretty clear that the choice of language is important. I would put forth that a good instructor is probably more important than the language itself. If you're going to teach Java, do it well. Be excellent at teaching and teach the right ideas. If Java is the language of choice, then use it in the service of teaching good design and computer science.

    Don't blame the language.

    2006-11-09 09:32:41
    Real programmers use only assembler.
    2007-01-09 03:39:26
    I have been using computers for 25 years and have a good understanding of types, strings, objects, inheritance, sequences, methods, functions, and all the other terms used in describing programing languages and or their structures. But, I couldn't write a program bigger then "Hello World". Todays computers are incredibly powerful. Why don't language developers use that power at the compile time to translate natural languages to machine language. The excuse that it isn't specific enough is hogwash. We can all read a well written instruction manual to accomplish some task without having to learn a new grammar. It is my understanding, that those early languages had limited resources available that justified their use. Today we have multiple core processors and in a year from now we will have virtual clusters using multiple threads in parallel on remote computers without shared memory. I think then you will wish for a more natural language that you will be able to easily understand, so you can conceptualize the complexities that will arise in software development of a highly fluid network with resources in a constant state of flux.
    2007-03-15 22:27:03
    I found your article by googling "most useful programming language". I will check out Yes, some people never know when to give up ; ).

    I was once suckered into one of those programming mill schools ( now running ads for medical assistant, office assistant), which offered to make a novice employable as a Cobol programmer in 6 months. By 2 months, I had retaken the IQ test (the only criteria, aside from $, for admission) to see if somehow I had gotten stupid. After all, I didn't find my hs foreign language experience difficult. Years later I still retained enough to French to assist a French speaking Haitian native in finding music. However, by 3 months I was out of the school. Though my departure was accelerated by health situations, I doubt I would have finished. All in all, it was a self confidence-sucking experience.

    In retrospect, I don't think intelligence alone is sufficient criteria for learning programming. Is it possible to teach programming to non-linear thinkers? Or even people with virtually nonexistant math backgrounds (which again point to a lack of experience in linear thinking)? If it is possible I would love to know where, what language, etc. I am fascinated by programming, yet intimidated by past experience. Unfortunately I don't think machines should misbehave and should be able to do what you want them to do. Only refusing to panic has kept me from owning my own little Times Square ticker (start -"windows will shut down in 30 seconds please save your work"...restart- "windows...etc).

    I doubt if I could diagram "See Spot run". However, I can and have proofread other people's work simply because I grew up with books in my face. Years of reading have given me familiarity with written English. If it looks wrong, and sounds wrong, it usually is. I don't know how that kind of familiarity experience can be extrapolated into programming language. Perhaps teaching methodology?

    2007-05-22 12:05:55
    One of the most profound difference between human languages and computer languages is not in the structure, but in this basic fact: Human languages are taught to people from the age of 0. Humans only learn computer languages much later, let's thumbsuck and say at average age 12 (some sooner, some later). You cannot expect anyone to take as naturally to a computer language as to a computer language.

    It's the same with music. Look at Mozart. He was arguably one of the most gifted musicians ever. He learned to play piano at age 4, but (I would think) learned to speak much sooner. He became a musical genius. Others (like myself) take up guitar when they're 16, and simply cannot expect to express themselves so well musically as one of the classical composers. So music does not come naturally to any of us; it's also something we learn, just like a computer language (and like a human language for that matter; except it's something all humans have to learn).

    It's simply not sensible or feasible to compare a computer languages with human language. The fact that they are both called "languages" and have words does not mean that a computer language should be as natural to a human as a human language. People can take to a computer language perhaps as easily as to music. Some have an aptitude for it, others don't.

    Andres J.
    2007-07-14 20:24:59
    I think that an ideal computer language would use some Programming Language syntax and some Natural Language ease of use. It would be great to not have to memorize strange names like in C:

    char mypointer[255];
    strcpy("some string", mypointer);

    some person who is learning programming, or who comes from another programming language, would vaguely understand what the code above does...

    computers are for making our life easier, so i think that a programming language should not force us to remember lots of names and functions, or search for what you want to do every time you don't remember the keyword.