Live data from Hacker News

Dijkstra On the foolishness of "natural language programming"

cs.utexas.edu

1–10 of 281 posts

Re: Dijkstra On the foolishness of "natural language programming"

#2
A great find!

The whole thing seems a step (or several steps) backwards also in terms of UX. I mean surely there was a reason why ls was named ls, and so forth?

A bonus point is that he had also something to say about a real or alleged degeneration of natural languages themselves.

Re: Dijkstra On the foolishness of "natural language programming"

#4
I somewhat disagree with this. In real life, say in some company, the inception of an idea for a new feature is made in the head of some business person. This person will not speak any formal language. So however you turn it, some translation from natural language to machine language will have to be done to implement the feature.

Typically the first step, translation from natural to formal language, will be done by business analysts and programmers. But why not try to let computers help along the way?

Re: Dijkstra On the foolishness of "natural language programming"

#5
Reminds me of another recurring idea of replacing code with flowcharts. First I've seen that idea coming from some unknown Soviet professor from 80s, and then again and again from different people from different countries in different contexts. Every time it is sold as a total breakthrough in simplicity and also every time it proves to be a bloat of complexity and a productivity killer instead.

Or weak typing. How many languages thought that simplifying strings and integers and other types into "scalar", and making any operation between any operands meaningful, would simplify the language? Yet every single one ended up becoming a total mess instead.

Or constraint-based UI layout. Looks so simple, so intuitive on simple examples, yet totally failing to scale to even a dozen of basic controls. Yet the idea keeps reappearing from time to time.

Or an attempt at dependency management by making some form of symlink to another repository e.g. git modules, or CMake's FetchContent/ExternalProject? Yeah, good luck scaling that.

Maybe software engineering should have some sort of "Hall of Ideas That Definitely Don't Work", so that young people entering the field could save their time on implementing one more incarnation of an already known not good idea.

Re: Dijkstra On the foolishness of "natural language programming"

#6
post #4

I somewhat disagree with this. In real life, say in some company, the inception of an idea for a new feature is made in the head of some business person. This person will not speak any formal language. So however you turn it, some translation from natural language to machine language will have to be done to implement the feature. Typically the first step, translation from natural to formal language, will be done by b…

I like your take.

The only issue I have with trusting a computer to do so much is that it doesn't necessarily have the long term vision or intuition some humans might have for the direction of the software product. There's so much nuance to the connection between a business need and getting it into software, or maybe I am overthinking it :D

Re: Dijkstra On the foolishness of "natural language programming"

#9
Natural language is pretty good for describing the technical requirements for the complex system, though. I.e. not the current code implementation, but why the current code implementation is selected vs other possible implementations. Not what code do, but what it is expected to do. Basically, most of the missing parts, that live in Jira-s, instead of your repo. It is also good, at allowing better refactoring capabilities, when all your system is described by outside rules, which could be enforced on the whole codebase. We just use programming languages, because it is easier to use in automated/computer context (and was the only way to use, to be honest, before all the LLM stuff). Though, while it gives us non-ambiguity on the local scale, it stops working on the global scale, the first moment person went and copy-pasted part of the code. Are you sure that part follows all the high-level restrictions we should to follow and is correct program? It is program that would run, when compile, but definition of run is pretty loose. In C++ program that corrupts all the memory is also runnable.
Post reply on HN