The Wasteful Legacy of Programming as Language

A few years ago I visited a friend who is a graduate student in linguistics. After some time he asked me if I was aware of the work by Chomsky on formal languages. I told him that yes, Chomsky work was a basis for much of the developments in theoretical computer science. More than that, I was glad to learn that there was something technical that I could share and discuss with other people in linguistics.

At the time I found this was just a great coincidence. It was only recently, though, that I started to think seriously about the implications of the idea that much of our understanding of computer programming stated with the study of human languages.

Language and Computers

One of the early ambitions in computer science was to understand, or at least be able to parse, human language. In order to do this, computer scientists explored models of how language worked in general. Based on these models, researchers figured out that we could classify languages in terms of complexity. Moreover, many computer languages could be entirely contained in some of the lower levels of this hierarchy, which is called the Chomsky hierarchy.

This was an incredible discovery for scientists working on compilers and interpreters, because its developments resulted in the necessary tools to efficiently parse languages. After that, instead of creating ad hoc parsers, which was the norm in the early period, one could apply a rigorous method to find a parser for a particular programming language.

The insidious side of this success, however, is that it completely changed the perceptions computer scientists have of how to give instructions to computers. We now have a frame of mind in which the important thing in the process of instructing a computer is to define a suitable language – and the more powerful the language the better.

The problem of this line of reasoning is that it creates a number of hurdles that are completely artificial, as we will soon discuss. For example, it makes us believe that there is something fundamentally different between programming languages, when in fact it doesn’t.

Computer Languages versus Human Languages

When we look at human languages, it does make sense that different languages exist. After all, language is a cultural concept. For example, as a speaker of two languages, it is very clear to me that speaking in English conveys different meaning and context, compared to things spoken in my mother language. There are a set of ideas that are better expressed in English, as well as there is a huge subset of thoughts that I wouldn’t be able to express well in anything other than my primary language.

As human beings, we want language to be inexact and able to convey several meanings. Contrary to the popular belief among mathematicians and engineers, this is a good feature of human languages, because it mimics the way we think. The truth about the study of language is that we are dealing with the whole culture of a community, not just with a stream of tokens that convey meaning.

The opposite, however, is true for computer languages. While we might strongly favor the use of human-like language, computers don’t really care if we use a bracket of a “begin” symbol to start a block of commands. Which means that we are, by introducing the subtleties of human language, complicating the task of how to instruct computers. Instead, we could just avoid the subtle differences in programming language and use a simple, uniform representation.

Unnecessary Work

The other problem with using current programming languages is that they create a lot of unnecessary work. Computer scientists have throughout the years devised baroque languages such as C++ and Java in an effort to provide programming instructions in a powerful way. It turns out, however, that the whole steps of writing a sequence of tokens, parsing that stream, and checking the syntax is unnecessary.

Everything in a computer program can be interpreted as a tree of expressions. If you’re encoding that tree in a block generated by a bracketed expression or a for loop it is not important for the computer. There is no reason why we cannot manipulate the syntax tree directly, for example, using a tree model on the screen, instead of parsing tokens used to recreate the tree every single time.

As a result, the use of a language is unnecessary in both sides: computers don’t care where the stream of bits is coming from. It could be coming from a direct binary representation or from a Java program with all variables in German.

Human beings, on the other hand, don’t necessarily need to use the language either. Although it may look like a useful feature, the existence of a language implies the manual labor of keeping a textual representation, as well as the algorithmic work of translating that representation back into a tree of expressions. The point is that, for all we care, we could just as well be moving boxes around the screen to represent variables — there is no necessity to create a textual document representing a program.

Divide and Conquer

Still, the other issue with programming languages is that it tends to divide programmers into artificial categories, one for each language or even flavor of a language. For example the only difference between a Java programmer and a C# programmer is that they use somewhat different keywords and have to program against a different run time library. The only reason C# and Java programmers think of themselves as different is that they use the concept of language to define themselves.

Being more polemic, the only difference between a C programmer and a Lisp programmer is in what their languages force them to do. A C programmer is forced by its language to write pointer-related code. While a Lisp programmer is forced to think in terms of lists of expressions (even when they’re using other data structures).

A language-less programming system, on the other hand, would avoid this kind of issue altogether by providing only the means to do work, without forcing programmers to use a pre-defined way of thinking. Whatever the form used to interact with the program, a language-less system doesn’t care if parts of the program are shaped as s-expressions or C blocks: it just combine them as needed to create a program.

In a program written in this way, using garbage collection is just a matter of plugging the right run time support, which you could get along with the system or you could buy from a third party. Instead, we erroneously consider garbage collection as a fundamental attribute of the language in use. As another example, in a language agnostic system we would would be able to create and call closures by just adding a simple module to the system, not by devising yet another language that supports closures as a first class citizen.

But the advantages don’t stop there. Without the need for a language, it also disappears the need for a compiler. Everything is such a system is already parsed and ready to use. When we combine pieces of code they already know how to glue themselves to each other, so there is no need for a linker either.

A system would regenerate a new executable in a fraction of a second, instead of going through the painful and wasteful process of language interpretation, code generation, linking. For example, what exactly is the need to recompile an entire file when we change only a single character? In a traditional language, that is entirely necessary, because you could be modifying the token “blass” to “class”, which changes entirely the meaning of the whole file. In a language-less system, this could never happen, because each transformation is related to the existing syntax tree, which is already stored in the system. Therefore, a single change like this can only have local effect in the program.

Why Such a System Doesn’t Exist?

There are several reasons, but the least important of them is technology. We have graphical capabilities in any modern desktop computer that are beyond what is necessary to implement the visualization features for such a programming environment. The main difficulty separating us from that goal is the experience we already have as programmers.

Each one of us have been trained to use textual languages as the main way of interact with computers. We have learned to use associated tools, such as grep and make, that are imperfect but that give good results if you are disciplined.

Moreover, it is satisfying to use the huge amount of code available with the existing technologies. Everyone of us have been conditioned for many years to look at what has been done in our programming language, and even reuse the code if needed.

I think that this is the main reason why visual languages have had such a hard time to establish themselves. After using such a language for a few minutes, you immediately feel that it is so much easier to go back and write yet another program in C or Java or Python. Of course, it will always be much more productive to use a tool that you’re used to.

However, we have never been able to really improve a language-less system enough to see their advantages as compared to traditional language-based systems. I believe that there will be a big jump in programming quality the day a group of people decide to develop a true language-agnostic programming system. And when programmers in general learn that they don’t need a language to create valid code they will think that we were just crazy for using, for such a long time, a concept as wasteful as that of programming language.

Photo credit: commons.wikimedia.com

Similar Posts:

Similar Posts

908 Comments

  1. See weather overview Information supplied by Weatherzone based on data provided
    by the Bureau of Meteorology (BOM) Personalise your weather experience
    and unlock powerful new features. Deadly storm roars into California with flooding rain,
    intense wind Very warm with low clouds
    Mostly cloudy. Showers late at night. Chance of rain 40%.
    Overnight temperatures falling to between 13 and 16 with daytime temperatures reaching the mid to high 20s.
    Winds southeasterly 20 to 30 km/h turning
    southerly 15 to 25 km/h in the evening. Winds southeast to southwesterly 15
    to 25 km/h tending east to southeasterly during the afternoon then becoming light during
    the evening. Overnight temperatures falling to around 14 with daytime temperatures reaching the mid to high 20s.
    Winds south to southwesterly 15 to 20 km/h tending south to southeasterly 25 to 35 km/h during the morning then becoming light
    during the evening.

    References:
    https://blackcoin.co/betmgm-your-ultimate-online-casino-experience/

  2. Rocket Casino holds as many as 3 tournaments at a time
    at all times. The more you play, the better rewards you can get.
    As always, potential identity verification may occur upon requesting a withdrawal for larger sums.

    The casino offers top notch games for everyone to enjoy and
    win. Casino Rocket gives new players a very generous welcome package that consists of two deposits.

    Each new tier gives a player more perks starting from
    increasing bonuses to decreasing number of wagering requirements.
    You are not allowed to play Belatra and iGTech pokies as
    well as Live Casino games for free, for real money only.
    The casino offers a nice number of games and providers.

    We take privacy and player welfare very seriously at Rocket and we never share your data with any third parties.
    You can see full payout ratios for most games by clicking
    on the paytable or information icon. Yes, Rocket
    Casino accepts a variety of cryptocurrencies for deposits and withdrawals, including Bitcoin, Ethereum,
    Litecoin, Dogecoin, and Tether. Yes, Rocket Casino is licensed and regulated under the
    Curacao Internet Gambling Act and uses advanced SSL encryption to ensure player security and fairness.

    References:
    https://blackcoin.co/gambling-laws-and-regulations-australia-2025/

  3. I’m gone to say to my little brother, that he should also pay a
    quick visit this webpage on regular basis to take updated from newest news.

  4. You will have access to all games, bonuses,
    registration, support and other functions without losing the quality of
    the interface and graphics. Try out the latest and best online
    casino table games and get an unforgettable gaming experience and vivid impressions today!

    The true test of any casino isn’t just the bonuses — it’s the games.
    The casino features online slots, table games, live dealer options, video poker, and specialty games from top developers.
    Yes, the casino welcomes Australian players, offering region-specific bonuses, currency options, and
    localized payment methods.
    If you aren’t at home, you can launch casino software via the King Billy mobile app for Android and iOS.
    All told, the gameplay side of King Billy Casino provides ample reason for Aussie punters to take note.
    In many cases, you can “pin” your favorite games for quick
    access next time you log in. Filtering options let
    you separate table games from slots, or you can browse by provider if
    you have a favourite developer.
    While users cannot checkout inside ChatGPT, they are redirected
    to the merchant’s website when they click on the link.

    OpenAI announced the addition of product recommendations on ChatGPT when users implied shopping intent in their queries.
    However, it was labeled underwhelming by some users due its performance shortly after its release.
    It is now available to both paying and non-paying ChatGPT users, with usage limitations of course.
    OpenAI announced that it is letting users buy goods directly in ChatGPT through a feature called Instant Checkout.

    References:
    https://blackcoin.co/win-up-to-1000-200-free-spins-at-winshark-casino/

  5. This is a great tip especially to those new to the blogosphere.
    Brief but very precise info… Thank you for sharing
    this one. A must read post!

  6. Great beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog website?
    The account helped me a acceptable deal. I had been tiny
    bit acquainted of this your broadcast offered bright clear concept

  7. I do not even know how I ended up here, but
    I thought this post was good. I don’t know who you are but definitely
    you’re going to a famous blogger if you are not already ;)
    Cheers!

  8. Greetings I am so happy I found your weblog, I really found you
    by accident, while I was researching on Bing for something else, Anyhow I am here now
    and would just like to say thanks for a fantastic post and a all round exciting blog
    (I also love the theme/design), I don’t have time to browse it all
    at the minute but I have bookmarked it and also added in your
    RSS feeds, so when I have time I will be back to read a lot more,
    Please do keep up the awesome work.

  9. Hi there just wanted to give you a quick heads up and let you
    know a few of the images aren’t loading properly. I’m not
    sure why but I think its a linking issue. I’ve tried
    it in two different internet browsers and both show the same results.

  10. I love your blog.. very nice colors & theme. Did you create this
    website yourself or did you hire someone
    to do it for you? Plz reply as I’m looking to create my own blog and would like to find out where u got this from.
    many thanks

  11. Its like you read my mind! You appear to know so much about this, like you
    wrote the book in it or something. I think that you
    could do with a few pics to drive the message home a bit,
    but instead of that, this is fantastic blog. An excellent read.
    I’ll definitely be back.

  12. Wow, marvelous blog format! How long have you ever been blogging for?
    you made running a blog look easy. The whole glance of your website is great, let alone the content material!

  13. Hi, i read your blog from time to time and i own a similar one
    and i was just wondering if you get a lot of spam feedback?

    If so how do you protect against it, any plugin or anything you can suggest?
    I get so much lately it’s driving me insane so any help is very
    much appreciated.

  14. We’re a group of volunteers and opening a new scheme in our community.
    Your site offered us with useful information to work on. You have performed an impressive process and
    our whole community shall be thankful to you.

  15. My partner and I stumbled over here different web page and thought I should check things out.
    I like what I see so i am just following you. Look forward to exploring your
    web page yet again.

  16. That is really fascinating, You are a very professional blogger.
    I have joined your feed and look forward to in the hunt for extra of your magnificent post.
    Also, I’ve shared your website in my social networks

  17. I am not sure where you are getting your information,
    but great topic. I needs to spend some time learning more or understanding more.

    Thanks for great info I was looking for this information for my
    mission.

  18. When someone writes an piece of writing he/she maintains the idea of a user
    in his/her brain that how a user can understand it. Therefore that’s why this article is perfect.
    Thanks!

  19. Good day very cool blog!! Man .. Beautiful .. Amazing
    .. I will bookmark your web site and take the feeds additionally?
    I’m happy to search out so many useful information right here within the post, we’d like work out more strategies on this regard, thanks for
    sharing. . . . . .

  20. We are a group of volunteers and starting a new scheme
    in our community. Your site offered us with valuable info to
    work on. You’ve done a formidable job and our whole community will be thankful to you.

  21. Having read this I thought it was very enlightening.
    I appreciate you taking the time and effort to put this short
    article together. I once again find myself personally spending way too much time both reading and
    posting comments. But so what, it was still worthwhile!

  22. Hello, There’s no doubt that your website could be having web
    browser compatibility problems. Whenever I take a
    look at your blog in Safari, it looks fine however, if opening in IE,
    it’s got some overlapping issues. I just wanted to give you a quick heads up!

    Besides that, excellent blog!

  23. Hello There. I found your blog using msn. This is a really well written article.
    I’ll be sure to bookmark it and return to read more of your useful information. Thanks for
    the post. I’ll definitely return.

  24. I am no longer positive the place you’re getting your info, but
    good topic. I needs to spend some time studying more or understanding more.
    Thanks for fantastic information I was looking for this information for my
    mission.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.