The Turing Tarpit or All Things Great are Small?!? (in a Programming Language Design)
A recent question in an e-mail was indicative of the mentality of “less is more” in programming languages. The question: “I've noticed that a large percentage
of your commands are various loop types; what is your argument for
having so many very specific types of loops?” The implication was that somehow this was wrong or bad...indicative of the “less is more” approach to programming language design. minimalism seems to have become a de facto “better” approach in a programming language.
Don’t get the wrong impression, I understand and believe that minimalism is important at the right place at the right time -- but not as an end unto itself. For example, I wrote as the lead author a computer architecture book in which the processor architecture had only one instruction -- the ultimate in “less is more”; but, the minimalism to an ultimate RISC processor had some interesting benefits and features. Minimalism was not the goal in and of itself.
The “Less is More” reminds me of a children’s book, “The Secret World of Og” by Pierre Berton (I remember seeing it as a television series way back in 1983 when I was a kid); in the book the inhabitants of the world of Og had only one word -- “og.” So how og was said, and how frequently could be anything from a joke to an insult. The less is more of linquistics, or in Ogish speak...”og...og...og.”
From the converse viewpoint of maximumism, or “more is less” too many choices preclude any actual choice. That very idea is the theme of the book, “The Paradox of Choice: Why More Is Less” by Barry Schwartz. That seemingly makes the justification for fewer choices, not more. But fewer is not always necessarily better either. We’ve all heard the adage in a dual choice, “The lesser of two evils.” -- but the lesser is still evil. In short, insufficient number of choices...a Morton's Fork.
Less is more becomes a Hobson’s choice -- no choice at all. More is less and less is more both are ultimately going full circle, leading to insufficient choice, reaching a “diminishing margin of returns” (to borrow a phrase from economics.)
More specifically for programming language design...less is more is the anathema of the Turing tarpit. To quote from a blog: “What is the Turing tar-pit? It's the place where a program has become so powerful, so general, that the effort to configure it to solve a specific problem matches or exceeds the effort to start over and write a program that solves the specific problem.
(This is especially dangerous for programming language designers. There's an irresistable urge to reduce a language to the smallest, most elegant core of axioms.)“
Where does the notion and implicitness of minimalism “less is more” originate? Rhetorical question it seems -- thoughtlessness and shallowness are intellectually lazy. Elegance of a programming language -- it seems an academic mindset, almost equating a programming language as a notation for expressing thought like some concise, neat, tidy, and elegant (there’s that word again) mathematical proof or theorem. (And yes, I know about Ken Iverson’s language APL based on the monograph “Notation as a Tool of Thought". APL was the ultimate write-only language, the 1960’s version of modern PERL scripting. The name APL = A Programming Language, a minimalist programming language name, but uninspired like calling a kitten “cat.”)
So my question in retort, is why not have just have a pre-conditional = while, and let the programmer codify specific loops - counted = for, infinite = loop, post-conditional=do-while. One loop, let the programmer create specific loop kinds.
Instead of loops or iterative statements, lets digress into colors for paints. The less is more approach to colors would be black...like Henry Ford said about the colors for the Model-T Ford, “You can have any color so long as it’s black.” A painter’s canvas is white, so black is the only color needed. Imagine the great works of art painted in this enlightened philosophy of less is more -- no grey, just black.
Now imagine the other extreme, zillions of colors to choose from. You can get perriwinkle blue, to sky blue, to raven black and midnight black, bone white to bleach white. Even choosing a color would be a major ordeal -- do you pick marigold yellow, or lemon yellow, or sunrise yellow, or...hopefully you see the idea.
The middle road, “enough is enough” is to provide a basic palette of colors -- the red, orange, yellow, blue, indigio, violet, black, and white. Enough colors to paint, but not be befuddled with hundreds of hues and pigments for one specific color.
Going back to language design, I agree that too much is bad, and too little. But, the important principles are expressivity to express codified thought in code, and giving the programmer choice. Both are lost when a language designer forces a programmer to choke on having to implement other varieties of the same entity only given in one form. I can remember some of the kludge code needed to have an early exit from a while-loop in Pascal, there was no early exit or escape mechanism like in C. Both expressivity, and choice were lost. (Kernighan talks about this in “Why Pascal is not my Favorite Programming Language.” which I read later as a computer science student...it captured what I’d thought but never formalized...)
So in Mynx, as the programming language designer, I give choice to the programmer, and allow some variety to focus on expressivity rather than some elegant minimalism. The iterative statements are:
1. finite: for
2. infinite: loop
3. pre-conditional:
a. true: while
b. false: until
4. post-conditional:
a. true: repeat-while
b. false: repeat-until
All iterative statements in Mynx have the ability to skip (next statement) or break (exit statement). Again, it is a choice by the programmer, and expressive for code--explicitly indicate a skip or exit on a specific condition.
The programming language designer has to think like the user of their language, like an artist who will paint a canvas. In short, Mynx is designed with a variety of iterative statements to give choice to the programmer and allow for rich expressivity in the language. Rather than provide a chalk pencil for a black or white image, Mynx has a full but finite palette of colors for the programmer to choose from. I as the language designer should not be making the choice for a future Mynx programmer/software developer.
of your commands are various loop types; what is your argument for
having so many very specific types of loops?” The implication was that somehow this was wrong or bad...indicative of the “less is more” approach to programming language design. minimalism seems to have become a de facto “better” approach in a programming language.
Don’t get the wrong impression, I understand and believe that minimalism is important at the right place at the right time -- but not as an end unto itself. For example, I wrote as the lead author a computer architecture book in which the processor architecture had only one instruction -- the ultimate in “less is more”; but, the minimalism to an ultimate RISC processor had some interesting benefits and features. Minimalism was not the goal in and of itself.
The “Less is More” reminds me of a children’s book, “The Secret World of Og” by Pierre Berton (I remember seeing it as a television series way back in 1983 when I was a kid); in the book the inhabitants of the world of Og had only one word -- “og.” So how og was said, and how frequently could be anything from a joke to an insult. The less is more of linquistics, or in Ogish speak...”og...og...og.”
From the converse viewpoint of maximumism, or “more is less” too many choices preclude any actual choice. That very idea is the theme of the book, “The Paradox of Choice: Why More Is Less” by Barry Schwartz. That seemingly makes the justification for fewer choices, not more. But fewer is not always necessarily better either. We’ve all heard the adage in a dual choice, “The lesser of two evils.” -- but the lesser is still evil. In short, insufficient number of choices...a Morton's Fork.
Less is more becomes a Hobson’s choice -- no choice at all. More is less and less is more both are ultimately going full circle, leading to insufficient choice, reaching a “diminishing margin of returns” (to borrow a phrase from economics.)
More specifically for programming language design...less is more is the anathema of the Turing tarpit. To quote from a blog: “What is the Turing tar-pit? It's the place where a program has become so powerful, so general, that the effort to configure it to solve a specific problem matches or exceeds the effort to start over and write a program that solves the specific problem.
(This is especially dangerous for programming language designers. There's an irresistable urge to reduce a language to the smallest, most elegant core of axioms.)“
Where does the notion and implicitness of minimalism “less is more” originate? Rhetorical question it seems -- thoughtlessness and shallowness are intellectually lazy. Elegance of a programming language -- it seems an academic mindset, almost equating a programming language as a notation for expressing thought like some concise, neat, tidy, and elegant (there’s that word again) mathematical proof or theorem. (And yes, I know about Ken Iverson’s language APL based on the monograph “Notation as a Tool of Thought". APL was the ultimate write-only language, the 1960’s version of modern PERL scripting. The name APL = A Programming Language, a minimalist programming language name, but uninspired like calling a kitten “cat.”)
So my question in retort, is why not have just have a pre-conditional = while, and let the programmer codify specific loops - counted = for, infinite = loop, post-conditional=do-while. One loop, let the programmer create specific loop kinds.
Instead of loops or iterative statements, lets digress into colors for paints. The less is more approach to colors would be black...like Henry Ford said about the colors for the Model-T Ford, “You can have any color so long as it’s black.” A painter’s canvas is white, so black is the only color needed. Imagine the great works of art painted in this enlightened philosophy of less is more -- no grey, just black.
Now imagine the other extreme, zillions of colors to choose from. You can get perriwinkle blue, to sky blue, to raven black and midnight black, bone white to bleach white. Even choosing a color would be a major ordeal -- do you pick marigold yellow, or lemon yellow, or sunrise yellow, or...hopefully you see the idea.
The middle road, “enough is enough” is to provide a basic palette of colors -- the red, orange, yellow, blue, indigio, violet, black, and white. Enough colors to paint, but not be befuddled with hundreds of hues and pigments for one specific color.
Going back to language design, I agree that too much is bad, and too little. But, the important principles are expressivity to express codified thought in code, and giving the programmer choice. Both are lost when a language designer forces a programmer to choke on having to implement other varieties of the same entity only given in one form. I can remember some of the kludge code needed to have an early exit from a while-loop in Pascal, there was no early exit or escape mechanism like in C. Both expressivity, and choice were lost. (Kernighan talks about this in “Why Pascal is not my Favorite Programming Language.” which I read later as a computer science student...it captured what I’d thought but never formalized...)
So in Mynx, as the programming language designer, I give choice to the programmer, and allow some variety to focus on expressivity rather than some elegant minimalism. The iterative statements are:
1. finite: for
2. infinite: loop
3. pre-conditional:
a. true: while
b. false: until
4. post-conditional:
a. true: repeat-while
b. false: repeat-until
All iterative statements in Mynx have the ability to skip (next statement) or break (exit statement). Again, it is a choice by the programmer, and expressive for code--explicitly indicate a skip or exit on a specific condition.
The programming language designer has to think like the user of their language, like an artist who will paint a canvas. In short, Mynx is designed with a variety of iterative statements to give choice to the programmer and allow for rich expressivity in the language. Rather than provide a chalk pencil for a black or white image, Mynx has a full but finite palette of colors for the programmer to choose from. I as the language designer should not be making the choice for a future Mynx programmer/software developer.
Labels: mynx minimalism loop

