Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
Of course. EWD 1008, titled "On the foolishness of 'natural language programming'," is a short but incredibly influential and characteristically polemical essay by Edsger W. Dijkstra, written on August 6, 1979. Analyzing it in detail requires looking at its context, its core arguments, its proposed alternative, and its lasting legacy in the world of software development. ### 1. Summary and Core Thesis At its heart, EWD 1008 is a forceful rejection of the idea that programming languages should be designed to resemble spoken or written human languages (like English). Dijkstra argues that this trend is not just a bad idea, but a form of "intellectual terrorism" and a "regrettable mistake." His central thesis is that the inherent qualities of natural language—ambiguity, verbosity, and lack of formal structure—are fundamentally at odds with the primary requirements of programming: **precision, unambiguity, and mathematical rigor.** ### 2. Historical Context: Why Was This Written? To understand Dijkstra's passion, we must look at the computing landscape of the late 1970s. * **The Rise of "User-Friendly" Languages:** The era saw the proliferation of languages designed to be accessible to non-specialists. **COBOL**, with its English-like sentences (`ADD 1 TO COUNTER`), was dominant in business. **BASIC** was designed for beginners and spreading rapidly on early personal computers. * **A Push for Accessibility:** There was a strong belief, both in industry and academia, that for computing to reach its full potential, programming had to be made easier for the masses. The "natural language" approach was seen as a key to unlocking this future. * **Dijkstra's Position:** Dijkstra was a leading figure in the structured programming movement, which advocated for formal, logical, and provably correct software. He viewed the "natural language" trend as a dangerous step backward, a "foolishness" that catered to intellectual laziness and undermined the discipline of programming. He saw it as an attempt to solve a social problem (making programming accessible) with a technically unsound solution. ### 3. Deconstruction of Dijkstra's Core Arguments Dijkstra makes his case through a series of sharp, memorable arguments and analogies. #### **Argument 1: The Incompatibility of Ambiguity and Precision** This is his most crucial point. Natural language relies on context, shared understanding, and inference to convey meaning. * **Example:** Consider the sentence, "I saw a man on a hill with a telescope." Who has the telescope? Me or the man? The sentence is ambiguous. A human can usually resolve this from context, but a computer cannot. It demands a single, unambiguous interpretation. * **Dijkstra's View:** Programming is the act of instructing a machine, which is the ultimate "context-free" entity. Every instruction must have one, and only one, precise meaning. Trying to use a tool (natural language) defined by its ambiguity for a task that demands absolute precision is, in his words, "a disastrous mistake." #### **Argument 2: Verbosity Obscures Logic** Natural language is notoriously wordy. Dijkstra argues that this verbosity acts as "noise," burying the actual computational logic in a sea of redundant words and grammatical fluff. * **Formal Notation:** A mathematical or formal notation (like `x = x + 1`) is concise. Each symbol is essential and contributes directly to the meaning. This forces the programmer to think clearly and makes the program's structure easier to analyze and reason about. * **Natural Language:** A statement like, "Now we need to increase the value of the counter by one," contains the same logic but padded with unnecessary words. Dijkstra believed this makes it harder to see the program for what it is: a mathematical construct. #### **Argument 3: The "Caterpillar" Analogy** This is a classic Dijkstra metaphor used to illustrate the foolishness of regression. * **The Analogy:** He compares a programmer to a caterpillar. The caterpillar's destiny is to become a butterfly, a creature of magnificent complexity and grace. However, if the caterpillar were to look at an earthworm and think, "That's what I should aspire to be—it's so simple and close to the ground," and try to mimic it, it would be a tragic regression. It would be abandoning its unique potential for a more primitive form of existence. * **The Meaning:** For Dijkstra, the programmer's unique potential is to harness the power of formal abstraction and mathematical logic—the "butterfly." Trying to regress to "natural language"—the "earthworm"—is to abandon this potential for a form of expression that is ill-suited for the task. #### **Argument 4: The Fallacy of "Obviousness"** Proponents of natural language programming often claim it makes code "obvious" and "self-documenting." Dijkstra scoffs at this. * **The Problem:** What is "obvious" to a human writer is based on a lifetime of experience and cultural context. A computer has none of this. It cannot understand "common sense." * **The Illusion:** The illusion of obviousness is dangerous because it makes the programmer less vigilant. When using a formal language, the programmer is constantly aware of the machine's rigid logic. When using a natural-like language, they might be fooled into thinking the computer "understands" the intent, leading to overlooked bugs and logical errors. ### 4. Dijkstra's Proposed Alternative Dijkstra doesn't just criticize; he presents a clear alternative. * **Formalism as a Tool for Thought:** He advocated for programming languages that are not just a means of giving orders to a machine, but are formal systems that help the programmer *think*. The language should force a discipline of thought that makes deriving correct programs more natural. * **Mathematical Notation:** His ideal is closer to pure mathematics than to English. The focus should be on program *derivation* and *correctness proofs*, not just on writing code that "works." The programmer's role is that of a logician or a mathematician. ### 5. Critical Evaluation: Strengths and Weaknesses **Strengths (Where Dijkstra was Undeniably Right):** * **The Ambiguity Problem:** His central critique remains one of the biggest challenges in computer science, especially in fields like Natural Language Processing (NLP) and AI. The difficulty of parsing human intent is a testament to his point. * **The Value of Precision:** The discipline of writing clear, unambiguous, and well-structured code is the hallmark of a great software engineer. Dijkstra's call for precision is a timeless principle of good craftsmanship. * **Influence on Language Design:** While the world didn't fully embrace his mathematical ideal, his ideas heavily influenced the design of later, more powerful languages like Pascal, and later, functional languages like Haskell, which emphasize formalism and correctness. **Weaknesses (Where the World Didn't Follow):** * **Underestimating Human Factors:** Dijkstra largely dismisses the importance of cognitive load, learnability, and accessibility. For many tasks, a language that is easier to read and write (like Python) can be more productive, even if it's less formally pure. * **The Economic Reality:** Full formal verification is incredibly expensive and time-consuming. For a vast majority of software (e.g., websites, business applications), it's economically unfeasible. The industry prioritized getting working software out the door over proving its absolute correctness. * **The Success of High-Level Languages:** The trend continued *towards* higher levels of abstraction. Languages like Python, Java, and C# are vastly more expressive and less machine-like than assembly or even C. They are not "natural language," but they are a clear rejection of the idea that programming must look like pure mathematics to be effective. ### 6. Legacy and Modern Relevance EWD 1008 is more relevant today than ever, but in new and unexpected contexts. * **Low-Code/No-Code Platforms:** These are the modern embodiment of what Dijkstra feared. They allow users to build applications using graphical interfaces and natural language-like configurations. Dijkstra would undoubtedly be critical, pointing out their limitations for building complex, scalable, and robust systems. However, their success in specific, well-defined domains shows that the "foolishness" can be practical when the problem space is constrained. * **AI Code Generation (GitHub Copilot, etc.):** This is the most fascinating modern development. AI models are being used to bridge the gap between a developer's natural language comment (`// fetch all users from the database and sort by name`) and formal, syntactically correct code. This can be seen as an attempt to get the "best of both worlds." However, it also highlights Dijkstra's concerns: the AI is a statistical model, not a reasoning engine. It can generate code that is subtly wrong, insecure, or inefficient because it doesn't *understand* the logic in a formal sense. The problem of ambiguity hasn't been solved; it's been outsourced to a probabilistic black box. ### Conclusion EWD 1008 is a brilliant, uncompromising, and essential piece of writing in the history of computer science. Dijkstra makes a powerful and enduring case for the intellectual discipline of programming. While the industry did not follow his path to the letter, his core warning against the seductive dangers of ambiguity and imprecision remains a vital lesson for every programmer. The debate he ignited—between formalism and pragmatism, between precision and accessibility—continues to shape the tools we use and the way we think about building software today.
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
SwapEngine Bug [build 1.3]
14 min ago | 0.32 KB
December smells like money
CSS | 28 min ago | 0.32 KB
✅ Changelly.com Exploit
42 min ago | 0.32 KB
Trading method
CSS | 57 min ago | 0.32 KB
SelectionEdit.pas
Delphi | 8 hours ago | 27.66 KB
SelectionEdit.h
C++ | 8 hours ago | 1.42 KB
SelectionEdit.cpp
C++ | 8 hours ago | 17.22 KB
PackageRelease.ps1
PowerShell | 8 hours ago | 24.87 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!