The foolishness of "natural language programming" (1978)

(cs.utexas.edu)

46 points | by xiaoyu2006 2 hours ago

16 comments

  • nickm12 1 hour ago
    I send this article to everyone who tells me how English is now a high-level programming language, the next level of abstraction up the chain from machine language to <their favorite language>. This analogy tends to be followed by "Just like most programmers never look at assembly code, looking at higher-level source code is going to become something only a few people do".

    Dijkstra's arguments tend not to change their minds. I think the analogy takes hold because there is a kernel of truth in it. AI models now give us the magical ability to program in natural language, but the implication that an AI model is a form of compiler is deeply flawed. AI models don't replace compilers, they replace software developers. The reason software developers rarely look at assembly code is that compilers (and emulators and VMs) are able to precisely preserve the semantics of the original program.

    A natural language spec is not a program, and there are many possible programs that can meet the spec. Software engineers and AI models turn specs into code, but the code is not the spec I think the analogy clouds our thinking about the value of programming languages as a tool for formally describing what the computer should do and enforcing properties of the program that should not be left to either humans or AI models to uphold.

    • indrex 1 hour ago
      You mean the English to code layer is stochastic while code to assembly is not?

      This stochastic nature existed before AI. Humans are stochastic too. Two engineers convert specs to code in two different ways. I would argue the distribution is wider among humans than among agents.

      • nickm12 29 minutes ago
        As I said, "AI models don't replace compilers, they replace software developers" so yes, I agree that AI models are like humans.

        while both LLMs and humans are not 100% deterministic, I don't think that's the interesting part. It's both true that there are many assembly language programs that implement a C program and that there are many valid programs (in any programming language) that correctly implement a natural language spec. But there's a significant qualitative difference between the two types of translation and that would be true regardless of whether the translations are stochastic.

      • DonaldPShimoda 46 minutes ago
        Arguing that two humans' distinct interpretations of a single specification is stochastic is patently absurd and requires, I think, some shred of evidence.

        I would argue that, in the absence of such evidence, we cannot conclude that the English-to-code conversion process is stochastic; it is merely not deterministic, which is altogether different.

  • GianFabien 1 hour ago
    Natural language is full of nuances and implicit cultural and domain specific connotations. LLMs work because they have been trained on massive corpus of materials that encode some (but not all) of those hidden meanings.

    With specification driven development, the prompts need to be very detailed in order to produce exactly what is required.

    • skeledrew 1 hour ago
      Humans also work because they've been trained on a massive corpus of materials, spanning like an average 15 year period or more. And humans too need to be prompted, sometimes everyday, with meetings and whatnot to produce exactly what is required.
      • LoganDark 1 hour ago
        I used to do software dev without meetings. It worked just fine. I would send whatever I did once it was done, and get direction on where to take it next. Maybe this breaks down in companies with more than a few leaders, or where the leaders can't otherwise keep in sync.

        Also gave me plenty of opportunities to go above and beyond. I miss when that felt safe.

        • dahart 1 hour ago
          This depends entirely on how well the requirements have been communicated, right? If you could go for long periods without meetings on large projects, it means either you had great PMs or you’re very good at collecting relevant info and planning in advance. Or, it could mean that your target was quite flexible and open to interpretation. I don’t doubt it, and I’ve known some developers who could do what you did, deliver something great without that much back and forth. I’ve also known many developers (probably most TBH) who will focus on problems the customers don’t have and endlessly go down rabbit holes that have no bottom. Heads down software engineering for big-O and data structures seems to be a lot more fun for some people than fixing weird hard to repro bugs with vague repro instructions that customers complain about. Many very good devs still need to check in and iterate and get some steering, especially if the requirements have not been well or fully explained… which in my own experience has been more or less always. ;)
          • LoganDark 27 minutes ago
            Maybe my definition of meetings is different than yours. To me, meetings are voice or video calls where multiple people talk about progress and direction, raise issues to the others, etc. and the leaders can make calls across the whole team at once. Staying in constant communication doesn't count as much because it's more async and incremental.
        • skeledrew 1 hour ago
          Maybe those were some very detailed requirements you were getting, the deliveries were straight-forward, or you already knew the space pretty well. Or you're the only dev there. Somehow most teams just keep tripping over each other and need near constant management to ensure they're delivering what the stakeholders expect.
          • LoganDark 30 minutes ago
            They weren't particularly detailed, but I did know the space quite well. I was a heavy user of other products of that type, and knew very well what I wanted out of one.
        • andsoitis 1 hour ago
          > I used to do software dev without meetings. It worked just fine. I would send whatever I did once it was done, and get direction on where to take it next.

          You didn’t collaborate with other engineers? Or what if the spec you were given was unclear in places? Forgive me, but the style you describe sounds incredibly collaborative, super transactional.

          • LoganDark 34 minutes ago
            Funny story actually, there were a few other engineers but not very much collaboration. They were resistant to sharing source code or algorithm details, so I had to essentially reverse engineer how their other products worked. I was good enough at it that I came up with several features they didn't know were possible. They eventually ended up letting me go and cloned my design, which I thought was weird, but it was developed for them in the first place so not a big deal.
            • Exoristos 27 minutes ago
              The lengths to which devs will go not to collaborate.
      • skydhash 1 hour ago
        > Humans also work because they've been trained on a massive corpus of materials,

        Massive? My introduction to programming (from noob to beginner level) has been like only 10 books worth of content. Including some alternative pathways like 3D, security, system administration,... To this day, I don't think I've reached 50 books of materials. And If I counted everything it would be still small.

        Human learning is very efficient (not time wise, but cost wise, and even training data wise).

        • skeledrew 49 minutes ago
          You're forgetting all the schooling before that, which taught you how to read, do math, etc. And the general daily experiences of just being a human being interacting with the world. Magnitudes more data taken in than any language model.
          • DonaldPShimoda 44 minutes ago
            > Magnitudes more data taken in than any language model.

            Ah, yes, I can fondly recall reading and internalizing every word available on the internet when I was young...

            • skeledrew 33 minutes ago
              You should check out how much raw data just your eyes process for every second they're open (although a significant amount is discarded before it gets to the vision center, but still). Then consider the other senses also constantly doing their thing.
              • LoganDark 25 minutes ago
                The vast majority of people don't internalize most things. Some internalize even less. It can become a big issue with things like dissociative disorders. (I have some experience with that)
            • nvme0n1p1 38 minutes ago
              A picture is worth a thousand words. How much video data was your brain trained on?
        • senordevnyc 1 hour ago
          Only if you ignore the billion years of pretraining…
    • groundzeros2015 1 hour ago
      Yep, LLMs work to the degree you don’t care shout the choices made. That’s why it’s great for demos and starter templates.

      But for mature software eventually every single detail matters.

    • montag 1 hour ago
      After reading this essay, I wonder: what if program code was withheld from training data? Then how useful would LLMs be for programming?
  • wseqyrku 4 minutes ago
    LLM interfaces on everything these days equates to touch screen on cars. It is definitely a useful tool, but generally speaking, that's not how you'd talk to your computer.
  • riknos314 1 hour ago
    > I suspect that machines to be programmed in our native tongues —be it Dutch, English, American, French, German, or Swahili— are as damned difficult to make as they would be to use.

    He's still quite correct. I generally see a machine as being "programmed in" whatever is tracked in source control. So as long as your git repo is tracking changes in Java, that's still programmed in Java, even if the Java was generated with the assistance of LLMs. I may consider the thesis of this article invalidated only when the majority of repos start tracking natural language rather than programming languages as the primary artifacts defining behavior of the software.

  • GarnetFloride 12 minutes ago
    Fun fact: there are over 600 definitions of the word "run" and over 400 for "set". But yeah, English is really precise enough for programming.

    How many times have we seen that there's been a spec for something and the programmers write something that is exactly like the spec said but was completely wrong?

  • hintymad 39 minutes ago
    What Dijkstra said still holds true, and the essence is consistent with Brooks' discussion on essential complexity vs accidental complexity. I do think one thing has changed, though: when someone asks AI to implement XXX with very vague English, the implicit ask is picking the best[1] ever solution that someone else has done to solve XXX. For instance, if I ask AI to extract the Japanese subtitle of Shirojima show and convert it to an epub with all the nantural and cultural explanations, I was assuming that AI will fill in the blanks and do a good job and AI did. This won't help expert, but does it matter? Being good enough can be good enough to take away many people's jobs.

    [1] For many people, the result is actually the mean not the best, but it's another topic.

  • likoya 28 minutes ago
    I find c++ very unnatural, since it's a giant collection of small rules in the end more complex than assembler. I can't remember the entire sintaxis, zoo of function decorators, undefined behavior, intrinsics which are just labels over asm instructions, Code golf sintaxis...
  • ThrowawayR2 47 minutes ago
    Dijkstra elegantly explains why AI systems are effective at mathematics and programming but much less effective when writing prose or other realms where what is good is nebulously defined:

    > "The virtue of formal texts is that their manipulations, in order to be legitimate, need to satisfy only a few simple rules; they are, when you come to think of it, an amazingly effective tool for ruling out all sorts of nonsense that, when we use our native tongues, are almost impossible to avoid."

  • hbarka 1 hour ago
    There’s em dashes in that 1978 article.
  • Brian_K_White 5 minutes ago
    Natural language as code has existed for thousands of years. Today we call it legalese.

    It's excruciating to write, excruciating to read, and even legit geniuses with decades of hard won experience still leave room for essentially infinite interpretation. laws and contracts are all still swiss cheese and can be made to demand or prohibit whatever the party with the most money or other influence wants.

  • jeanpah 1 hour ago
    This article shows every now and then, and it's a must read. Indeed the natural language programming requires massive clusters of gpus just to make a half baked crud app
  • anonymous908213 1 hour ago
    > (You have only to look at the indeed alarming amount of on close reading meaningless verbiage in scientific articles, technical reports, government publications etc.)

    It is perhaps for the best that Djikstra did not live long enough to witness this problem become orders of magnitude worse.

  • xiaoyu2006 2 hours ago
    A really interesting read in the current era.
  • mjb 1 hour ago
    And yet, the specification of almost every program in existence was communicated in natural language. At least between the customer and developer.

    This argument makes the implicit assumption that humans are uniquely able to convert between this "customer wants a program that solves their problem" level and compileable code. That was a reasonable thing to believe in 1978, but is not a reasonable thing to believe in 2026.

  • anthk 47 minutes ago
    Inform7 disagrees; altough you can use Inform6 which is like a really simple OOP language to create text adventures.
    • beej71 13 minutes ago
      I appreciate inform7 is quite human-readable, but it's not free form.
  • nitbard 43 minutes ago
    [dead]