Edsger Dijkstra argues against "natural language programming," believing it a foolish endeavor. He contends that natural language's inherent ambiguity and imprecision make it unsuitable for expressing the rigorous logic required in programming. Instead of striving for superficial readability through natural language, Dijkstra advocates for focusing on developing formal notations and abstractions that are clear, concise, and verifiable, even if they appear less "natural" initially. He emphasizes that programming requires a level of precision and unambiguity that natural language simply cannot provide, and attempting to bridge this gap will ultimately lead to more confusion and less reliable software.
Edsger W. Dijkstra, in his characteristically pointed style, argues vehemently against the pursuit of what he terms the "utterly preposterous" goal of "natural language programming." He meticulously dissects the very premise of using natural language as a medium for communicating with computers, highlighting the inherent ambiguity and imprecision that plague human languages. Dijkstra contends that these qualities, which make natural language rich and nuanced for human interaction, render it utterly unsuitable for the exacting and unambiguous demands of computer programming.
He elaborates on the fundamental difference between human communication, which often relies on context, shared understanding, and implicit assumptions, and the rigorous, formal logic required for instructing a machine. While humans can easily navigate the ambiguities and nuances of natural language, computers require explicit, unambiguous instructions. Dijkstra emphasizes that the vagueness and imprecision inherent in natural language would inevitably lead to misinterpretations and unpredictable behavior in computer programs.
Furthermore, Dijkstra criticizes the notion that natural language programming would make programming accessible to a wider audience. He argues that the true difficulty in programming lies not in the syntax or vocabulary used, but in the intellectual challenge of formulating precise and logically sound algorithms. Simply replacing formal programming languages with natural language would not alleviate this core difficulty, and might even obfuscate it further by creating a false sense of understanding.
Dijkstra also dismisses the idea that advancements in artificial intelligence could somehow bridge the gap between the ambiguity of natural language and the precision required for programming. He believes that attempting to imbue computers with the ability to interpret the nuances and ambiguities of human language is a misguided effort, diverting resources from more fruitful avenues of research.
In conclusion, Dijkstra firmly believes that the pursuit of natural language programming is a fundamentally flawed endeavor, based on a misunderstanding of both the nature of human language and the requirements of computer programming. He advocates for continued focus on developing and refining formal programming languages, which offer the precision, clarity, and unambiguous structure necessary for effective communication with computers. He sees these formal languages as essential tools for managing the inherent complexity of software development, rather than seeking illusory simplicity in the imprecise realm of natural language.
Summary of Comments ( 131 )
https://news.ycombinator.com/item?id=43564386
HN commenters generally agree with Dijkstra's skepticism of "natural language programming." Some highlight the ambiguity inherent in natural language as fundamentally incompatible with the precision required for programming. Others point out the success of domain-specific languages (DSLs) as a middle ground, offering a more human-readable syntax without sacrificing clarity. One commenter suggests Dijkstra's critique is more aimed at vague specifications disguised as programs rather than genuinely well-defined natural language programming. Several commenters mention the value of formal methods and mathematical notation for clear program design, echoing Dijkstra's sentiments. A few offer historical context, suggesting the "natural language programming" Dijkstra criticized likely refers to early, overly ambitious attempts, and that modern NLP advancements might warrant revisiting the concept.
The Hacker News post titled "Dijkstra On the foolishness of "natural language programming"" links to Edsger W. Dijkstra's manuscript EWD667, where he argues against using natural language for programming. The comments section features a robust discussion around Dijkstra's points, with several commenters offering diverse perspectives.
Several commenters agree with Dijkstra's core argument, emphasizing the inherent ambiguity and imprecision of natural language, which they see as unsuitable for the rigor and clarity required in programming. They highlight the importance of formal languages for expressing logical instructions unambiguously. Some point out that while natural language can be useful for high-level design discussions or documentation, translating it directly into executable code presents significant challenges and can lead to unreliable or unpredictable software.
A recurring theme in the comments is the distinction between "natural language programming" as envisioned in the past (i.e., literally programming in English or other natural languages) versus more modern approaches like using natural language for generating code or interacting with coding tools. Some commenters argue that Dijkstra's criticisms, while valid in the context of his time, may not fully apply to these newer paradigms. They point to advancements in natural language processing and machine learning that enable more sophisticated analysis and interpretation of natural language, potentially mitigating some of the ambiguity issues.
Some commenters bring up the importance of domain-specific languages (DSLs) as a middle ground between natural language and formal programming languages. DSLs allow developers to express logic using terminology closer to the specific problem domain while retaining the precision and unambiguity of formal languages.
A few commenters offer counterpoints to Dijkstra's arguments. Some suggest that natural language can be a valuable tool for making programming more accessible to non-experts or for rapid prototyping. Others argue that forcing programmers to think in terms of formal languages can sometimes hinder creativity and problem-solving.
One commenter points out that Dijkstra's strong stance against natural language programming might stem from his background in mathematics and formal logic, which naturally favor precise and unambiguous systems.
Overall, the comments section presents a nuanced discussion of the topic. While many agree with the fundamental points raised by Dijkstra, they also acknowledge the evolving landscape of programming and the potential for natural language to play a helpful role in certain contexts, albeit with careful consideration of its limitations. Several comments distinguish between the naive approach of directly translating natural language to code and the more nuanced possibilities afforded by modern NLP techniques, emphasizing the importance of context when interpreting Dijkstra's arguments.