TL;DR
A 2016 essay argues that while libraries drive most practical programmer productivity, the expressive power of a programming language determines what kinds of libraries are possible and how ergonomic they are. The author contends that sometimes creating new language features (or new languages) is necessary to enable the right libraries and frameworks.
What happened
In a reflective piece, the author recounts a common view: many programmers attribute productivity to rich libraries rather than to language features. Using Ruby on Rails as a central example, he shows how Rails leverages Ruby-specific capabilities—meta-programming, runtime evaluation, first-class functions, dynamic typing and garbage collection—to give web developers high-level, easy-to-use abstractions. Attempts to replicate Rails in languages such as Java or C fail not for lack of interest or market size, but because those languages lack the necessary primitives, forcing awkward workarounds (for example, many handler classes in place of functions). The essay traces how early languages and C-style function libraries fit batch computing, but interactive software created demand for extensible libraries and frameworks. The author describes his own motivation for designing a new language (Stanza) after struggling to build a concise game library in Java; by contrast, Scheme’s continuations made the same library far simpler, though it traded off static typing.
Why it matters
- Library ecosystems are a major determinant of developer productivity, but their shape is constrained by language features.
- Choosing or designing a language affects how easy it is to build reusable, high-level abstractions and frameworks.
- Workarounds in languages lacking certain primitives can produce clunky, hard-to-use libraries, raising maintenance and usability costs.
- Sometimes language-level features (not just libraries) are required to enable the desired ergonomics for application domains.
Key facts
- Many programmers credit libraries—like Ruby on Rails—for enabling rapid application development.
- Rails relies heavily on Ruby features such as meta-programming, runtime evaluation, first-class functions, dynamic typing and garbage collection.
- The author argues that neither programmer incompetence nor economics explain why Rails hasn’t been faithfully ported to languages like Java or C.
- C-style languages tend to produce libraries composed mainly of functions; Java-style approaches often require many handler or subclass implementations.
- Interactive programs increased the need for extensible libraries and gave rise to the widespread use of frameworks.
- The author’s difficulty implementing an easy-to-use game library in Java motivated exploration of languages with continuations and ultimately language design work (Stanza).
- Scheme’s support for continuations made building the author’s game library simpler, but it lacked the static typing that helped catch errors in Java.
What to watch next
- Whether language designers prioritize features that directly enable more ergonomic libraries (meta-programming, continuations, first-class functions).
- The emergence of new languages or language extensions aimed at making library and framework design easier (the author cites his own work on Stanza).
- Attempts to replicate high-level frameworks in languages without supporting primitives and whether those attempts settle for clunkier patterns or push language change.
Quick glossary
- Library: A collection of prewritten code modules that provide reusable functionality developers can call or extend.
- Framework: A higher-level structure that prescribes program architecture and often requires users to plug in specific callbacks or subclasses.
- Meta-programming: Techniques that allow programs to inspect, generate or modify code at runtime or compile time.
- First-class function: A function treated as a value that can be passed, returned, and stored like other data.
- Continuation / Coroutine: Control-flow abstractions that let a computation pause and resume, enabling sequential-style programming of asynchronous or event-driven behavior.
Reader FAQ
Is the essay saying libraries are more important than languages?
The author says libraries provide the biggest productivity gains for most programmers but argues this view is incomplete because language features determine what libraries can express.
Why can’t Rails be ported to Java or C?
According to the author, Rails depends on language primitives (meta-programming, runtime evaluation, first-class functions, dynamic typing, garbage collection) that Java and C don’t provide in comparable ways.
Are economics or programmer skill the reason ports don’t exist?
The essay rejects economics and incompetence as primary reasons for the lack of equivalent frameworks in some languages.
Does the author advocate for designing new languages?
Yes; the author describes designing a new language (Stanza) as a response to library expressiveness limits encountered in existing languages.
HomePhilosophyDownloadsDocumentationPeopleCommunityNewsReference NAVIGATION "Stop Designing Languages. Write Libraries Instead." "Stop Designing Languages. Write Libraries Instead." Patrick S. Li – May 29, 2016 I had a friend tell me recently that all…
Sources
- “Stop Designing Languages. Write Libraries Instead” (2016)
- Why do I have the impression that we cannot innovate in …
- The barrier to take-up of language innovation
- The design side of programming language design
Related posts
- GNOME developer proposes removing Linux middle-click paste across apps
- How a Single A4 Sheet Can Serve as a Quick, Impractical Measuring Tool
- GNOME developer proposes removing Linux’s long-standing middle-click paste