pgstrata
Being Popular
2

May 2001

3

*(This article was written as a kind of business plan for a new language [blocked].

4

So it is missing (because it takes for granted) the most important feature of a good programming language: very powerful abstractions.)*

5

A friend of mine once told an eminent operating systems expert that he wanted to design a really good programming language.

6

The expert told him that it would be a waste of time, that programming languages don't become popular or unpopular based on their merits, and so no matter how good his language was, no one would use it.

7

At least, that was what had happened to the language he had designed.

8

What does make a language popular?

9

Do popular languages deserve their popularity?

10

Is it worth trying to define a good programming language?

11

How would you do it?

12

I think the answers to these questions can be found by looking at hackers, and learning what they want.

13

Programming languages are for hackers, and a programming language is good as a programming language (rather than, say, an exercise in denotational semantics or compiler design) if and only if hackers like it.

3–4

(This article was written as a kind of business plan for a new language [blocked]. So it is missing the most important feature of a good language: very powerful abstractions.)

5–7

A friend told an eminent operating systems expert he wanted to design a really good language. The expert said it would be a waste of time: languages don't become popular on their merits, so no matter how good his was, no one would use it. At least, that was what had happened to the language he had designed.

8–13

What makes a language popular, and do popular languages deserve it? The answers can be found by looking at hackers, since languages are for hackers — and a language is good as a programming language if and only if hackers like it.

2–13

An expert told a friend that languages get popular regardless of merit, so designing a good one is futile. To answer what makes a language good, look at hackers: a language is good if and only if hackers like it.

15

1 The Mechanics of Popularity

16

It's true, certainly, that most people don't choose programming languages simply based on their merits.

17

Most programmers are told what language to use by someone else.

18

And yet I think the effect of such external factors on the popularity of programming languages is not as great as it's sometimes thought to be.

19

I think a bigger problem is that a hacker's idea of a good programming language is not the same as most language designers'.

20

Between the two, the hacker's opinion is the one that matters.

21

Programming languages are not theorems. They're tools, designed for people, and they have to be designed to suit human strengths and weaknesses as much as shoes have to be designed for human feet.

22

If a shoe pinches when you put it on, it's a bad shoe, however elegant it may be as a piece of sculpture.

23

It may be that the majority of programmers can't tell a good language from a bad one.

24

But that's no different with any other tool.

25

It doesn't mean that it's a waste of time to try designing a good language. Expert hackers [blocked] can tell a good language when they see one, and they'll use it.

26

Expert hackers are a tiny minority, admittedly, but that tiny minority write all the good software, and their influence is such that the rest of the programmers will tend to use whatever language they use.

27

Often, indeed, it is not merely influence but command: often the expert hackers are the very people who, as their bosses or faculty advisors, tell the other programmers what language to use.

28

The opinion of expert hackers is not the only force that determines the relative popularity of programming languages — legacy software (Cobol) and hype (Ada, Java) also play a role — but I think it is the most powerful force over the long term.

29

Given an initial critical mass and enough time, a programming language probably becomes about as popular as it deserves to be.

30

And popularity further separates good languages from bad ones, because feedback from real live users always leads to improvements.

31

Look at how much any popular language has changed during its life.

32

Perl and Fortran are extreme cases, but even Lisp has changed a lot.

33

Lisp 1.5 didn't have macros, for example; these evolved later, after hackers at MIT had spent a couple years using Lisp to write real programs. [1]

34

So whether or not a language has to be good to be popular, I think a language has to be popular to be good.

35

And it has to stay popular to stay good.

36

The state of the art in programming languages doesn't stand still.

37

And yet the Lisps we have today are still pretty much what they had at MIT in the mid-1980s, because that's the last time Lisp had a sufficiently large and demanding user base.

38

Of course, hackers have to know about a language before they can use it.

39

How are they to hear?

40

From other hackers.

41

But there has to be some initial group of hackers using the language for others even to hear about it.

42

I wonder how large this group has to be; how many users make a critical mass?

43

Off the top of my head, I'd say twenty.

44

If a language had twenty separate users, meaning twenty users who decided on their own to use it, I'd consider it to be real.

45

Getting there can't be easy.

46

I would not be surprised if it is harder to get from zero to twenty than from twenty to a thousand.

47

The best way to get those initial twenty users is probably to use a trojan horse: to give people an application they want, which happens to be written in the new language.

16–22

Most people are told what language to use, but external factors matter less than supposed; the bigger problem is that a hacker's idea of a good language isn't a designer's, and the hacker's opinion is the one that matters. Languages are tools, designed to suit human strengths and weaknesses as much as shoes are designed for feet. If a shoe pinches, it's a bad shoe, however elegant.

23–27

Maybe most programmers can't tell a good language from a bad one, but that's true of any tool. Expert hackers [blocked] can tell. They're a tiny minority, but they write all the good software, and the rest follow their lead — often by command, since they're the bosses telling everyone what to use.

28–33

Expert opinion isn't the only force — legacy software and hype play a role — but it's the most powerful over the long term. Given critical mass and time, a language becomes about as popular as it deserves, and popularity further separates good from bad, because feedback from real users leads to improvements. Even Lisp gained macros only after MIT hackers spent years writing real programs in it.

34–37

So whether or not a language has to be good to be popular, a language has to be popular to be good, and to stay popular to stay good. Today's Lisps are still basically what MIT had in the mid-1980s, the last time Lisp had a large, demanding user base.

38–47

Hackers hear about languages from other hackers, so there must be an initial group using one. How many make a critical mass? Off the top of my head, twenty who decided on their own to use it makes a language real. The best way to get there is a trojan horse: an application people want that happens to be written in it.

15–47

Most programmers are told what language to use, but external factors matter less than the gap between what hackers want and what designers build. Languages get about as popular as they deserve, and need an initial critical mass of maybe twenty users.

49

2 External Factors

50

Let's start by acknowledging one external factor that does affect the popularity of a programming language.

51

To become popular, a programming language has to be the scripting language of a popular system.

52

Fortran and Cobol were the scripting languages of early IBM mainframes.

53

C was the scripting language of Unix, and so, later, was Perl.

54

Tcl is the scripting language of Tk.

55

Java and Javascript are intended to be the scripting languages of web browsers.

56

Lisp is not a massively popular language because it is not the scripting language of a massively popular system.

57

What popularity it retains dates back to the 1960s and 1970s, when it was the scripting language of MIT.

58

A lot of the great programmers of the day were associated with MIT at some point.

59

And in the early 1970s, before C, MIT's dialect of Lisp, called MacLisp, was one of the only programming languages a serious hacker would want to use.

60

Today Lisp is the scripting language of two moderately popular systems, Emacs and Autocad, and for that reason I suspect that most of the Lisp programming done today is done in Emacs Lisp or AutoLisp.

61

Programming languages don't exist in isolation.

62

To hack is a transitive verb — hackers are usually hacking something — and in practice languages are judged relative to whatever they're used to hack.

63

So if you want to design a popular language, you either have to supply more than a language, or you have to design your language to replace the scripting language of some existing system.

64

Common Lisp is unpopular partly because it's an orphan.

65

It did originally come with a system to hack: the Lisp Machine.

66

But Lisp Machines (along with parallel computers) were steamrollered by the increasing power of general purpose processors in the 1980s.

67

Common Lisp might have remained popular if it had been a good scripting language for Unix.

68

It is, alas, an atrociously bad one.

69

One way to describe this situation is to say that a language isn't judged on its own merits.

70

Another view is that a programming language really isn't a programming language unless it's also the scripting language of something.

71

This only seems unfair if it comes as a surprise.

72

I think it's no more unfair than expecting a programming language to have, say, an implementation.

73

It's just part of what a programming language is.

74

A programming language does need a good implementation, of course, and this must be free.

75

Companies will pay for software, but individual hackers won't, and it's the hackers you need to attract.

76

A language also needs to have a book about it.

77

The book should be thin, well-written, and full of good examples.

78

K&R is the ideal here.

79

At the moment I'd almost say that a language has to have a book published by O'Reilly.

80

That's becoming the test of mattering to hackers.

81

There should be online documentation as well.

82

In fact, the book can start as online documentation.

83

But I don't think that physical books are outmoded yet.

84

Their format is convenient, and the de facto censorship imposed by publishers is a useful if imperfect filter.

85

Bookstores are one of the most important places for learning about new languages.

50–55

One external factor really matters: to become popular, a language must be the scripting language of a popular system. Fortran and Cobol scripted IBM mainframes; C scripted Unix, and later so did Perl; Java and Javascript are meant to script web browsers.

56–63

Lisp isn't massively popular because it doesn't script one. What popularity it keeps dates to when it scripted MIT; today it scripts only Emacs and Autocad. To hack is a transitive verb, and languages are judged relative to whatever they hack — so to design a popular language, you either supply more than a language or replace some system's scripting language.

64–68

Common Lisp is unpopular partly because it's an orphan. It came with the Lisp Machine to hack — but Lisp Machines were steamrollered by general-purpose processors in the 1980s. Common Lisp might have survived as a good Unix scripting language. It is, alas, an atrociously bad one.

69–75

You could say a language isn't really a language unless it also scripts something — no more unfair than expecting it to have an implementation. And the implementation must be free: companies will pay for software, but individual hackers won't, and it's the hackers you need.

76–85

A language also needs a book — thin, well-written, full of good examples. K&R is the ideal; at the moment I'd almost say it has to be published by O'Reilly. Online documentation matters too, but physical books aren't outmoded: the de facto censorship of publishers is a useful filter, and bookstores are important places for learning about new languages.

49–85

To become popular, a language must be the scripting language of a popular system — that's why Lisp faded and Common Lisp, an orphan, never caught on. A language also needs a free implementation, a thin good book, and something to hack.

87

3 Brevity

88

Given that you can supply the three things any language needs — a free implementation, a book, and something to hack — how do you make a language that hackers will like?

89

One thing hackers like is brevity.

90

Hackers are lazy, in the same way that mathematicians and modernist architects are lazy: they hate anything extraneous.

91

It would not be far from the truth to say that a hacker about to write a program decides what language to use, at least subconsciously, based on the total number of characters he'll have to type.

92

If this isn't precisely how hackers think, a language designer would do well to act as if it were.

93

It is a mistake to try to baby the user with long-winded expressions that are meant to resemble English.

94

Cobol is notorious for this flaw.

95

A hacker would consider being asked to write

96

add x to y giving z

97

instead of

98

z = x+y

99

as something between an insult to his intelligence and a sin against God.

100

It has sometimes been said that Lisp should use first and rest instead of car and cdr, because it would make programs easier to read.

101

Maybe for the first couple hours.

102

But a hacker can learn quickly enough that car means the first element of a list and cdr means the rest. Using first and rest means 50% more typing.

103

And they are also different lengths, meaning that the arguments won't line up when they're called, as car and cdr often are, in successive lines.

104

I've found that it matters a lot how code lines up on the page.

105

I can barely read Lisp code when it is set in a variable-width font, and friends say this is true for other languages too.

106

Brevity is one place where strongly typed languages lose.

107

All other things being equal, no one wants to begin a program with a bunch of declarations.

108

Anything that can be implicit, should be.

109

The individual tokens should be short as well.

110

Perl and Common Lisp occupy opposite poles on this question.

111

Perl programs can be almost cryptically dense, while the names of built-in Common Lisp operators are comically long.

112

The designers of Common Lisp probably expected users to have text editors that would type these long names for them.

113

But the cost of a long name is not just the cost of typing it.

114

There is also the cost of reading it, and the cost of the space it takes up on your screen.

89–92

One thing hackers like is brevity. Hackers are lazy, the way mathematicians and modernist architects are lazy: they hate anything extraneous. A hacker decides what language to use, at least subconsciously, by the total number of characters he'll have to type — and a designer would do well to act as if that were true.

93–99

It's a mistake to baby the user with long-winded expressions meant to resemble English; Cobol is notorious for this. A hacker asked to write add x to y giving z instead of z = x+y would consider it something between an insult to his intelligence and a sin against God.

100–105

Some say Lisp should use first and rest instead of car and cdr, for readability. Maybe for the first couple hours — but a hacker quickly learns them, and first/rest mean 50% more typing. They're also different lengths, so arguments won't line up in successive lines, and it matters a lot how code lines up on the page.

106–114

Brevity is one place strongly typed languages lose; anything that can be implicit should be. Individual tokens should be short too. Perl can be cryptically dense, while built-in Common Lisp names are comically long — and a name's cost isn't just typing it; there's the cost of reading it and the screen space it takes.

87–114

Hackers like brevity — they're lazy and hate anything extraneous, choosing languages by how few characters they type. Long-winded English-like syntax, mandatory declarations, and comically long names all lose; everything that can be implicit should be.

116

4 Hackability

117

There is one thing more important than brevity to a hacker: being able to do what you want.

118

In the history of programming languages a surprising amount of effort has gone into preventing programmers from doing things considered to be improper.

119

This is a dangerously presumptuous plan.

120

How can the language designer know what the programmer is going to need to do?

121

I think language designers would do better to consider their target user to be a genius who will need to do things they never anticipated, rather than a bumbler who needs to be protected from himself.

122

The bumbler will shoot himself in the foot anyway.

123

You may save him from referring to variables in another package, but you can't save him from writing a badly designed program to solve the wrong problem, and taking forever to do it.

124

Good programmers often want to do dangerous and unsavory things.

125

By unsavory I mean things that go behind whatever semantic facade the language is trying to present: getting hold of the internal representation of some high-level abstraction, for example.

126

Hackers like to hack, and hacking means getting inside things and second guessing the original designer.

127

Let yourself be second guessed. When you make any tool, people use it in ways you didn't intend, and this is especially true of a highly articulated tool like a programming language.

128

Many a hacker will want to tweak your semantic model in a way that you never imagined.

129

I say, let them; give the programmer access to as much internal stuff as you can without endangering runtime systems like the garbage collector.

130

In Common Lisp I have often wanted to iterate through the fields of a struct — to comb out references to a deleted object, for example, or find fields that are uninitialized.

131

I know the structs are just vectors underneath.

132

And yet I can't write a general purpose function that I can call on any struct.

133

I can only access the fields by name, because that's what a struct is supposed to mean.

134

A hacker may only want to subvert the intended model of things once or twice in a big program.

135

But what a difference it makes to be able to.

136

And it may be more than a question of just solving a problem.

137

There is a kind of pleasure here too.

138

Hackers share the surgeon's secret pleasure in poking about in gross innards, the teenager's secret pleasure in popping zits. [2] For boys, at least, certain kinds of horrors are fascinating.

139

Maxim magazine publishes an annual volume of photographs, containing a mix of pin-ups and grisly accidents.

140

They know their audience.

141

Historically, Lisp has been good at letting hackers have their way.

142

The political correctness of Common Lisp is an aberration.

143

Early Lisps let you get your hands on everything.

144

A good deal of that spirit is, fortunately, preserved in macros.

145

What a wonderful thing, to be able to make arbitrary transformations on the source code.

146

Classic macros are a real hacker's tool — simple, powerful, and dangerous.

147

It's so easy to understand what they do: you call a function on the macro's arguments, and whatever it returns gets inserted in place of the macro call.

148

Hygienic macros embody the opposite principle.

149

They try to protect you from understanding what they're doing.

150

I have never heard hygienic macros explained in one sentence.

151

And they are a classic example of the dangers of deciding what programmers are allowed to want.

152

Hygienic macros are intended to protect me from variable capture, among other things, but variable capture is exactly what I want in some macros.

153

A really good language should be both clean and dirty: cleanly designed, with a small core of well understood and highly orthogonal operators, but dirty in the sense that it lets hackers have their way with it.

154

C is like this.

155

So were the early Lisps.

156

A real hacker's language will always have a slightly raffish character.

157

A good programming language should have features that make the kind of people who use the phrase "software engineering" shake their heads disapprovingly.

158

At the other end of the continuum are languages like Ada and Pascal, models of propriety that are good for teaching and not much else.

117–123

There's one thing more important than brevity: being able to do what you want. Much effort has gone into stopping programmers from doing improper things — a dangerously presumptuous plan. Better to treat your user as a genius who'll need to do things you never anticipated than a bumbler to protect; the bumbler will shoot himself in the foot regardless.

124–129

Good programmers often want to do unsavory things — going behind the language's semantic facade to get hold of some abstraction's internal representation. Hacking means second-guessing the original designer. Let yourself be second guessed. Give the programmer access to as much internal stuff as you can without endangering runtime systems like the garbage collector.

130–133

In Common Lisp I've often wanted to iterate through a struct's fields. I know structs are just vectors underneath, yet I can only access fields by name, because that's what a struct is supposed to mean.

134–140

A hacker may want to subvert the intended model only once or twice in a big program — but what a difference it makes to be able to. There's pleasure here too: hackers share the surgeon's secret pleasure in poking about in gross innards, the teenager's secret pleasure in popping zits.

141–152

Historically Lisp has been good at letting hackers have their way; Common Lisp's political correctness is an aberration. Much of that spirit survives in macros — what a wonderful thing, to make arbitrary transformations on the source code. Classic macros are simple, powerful, dangerous. Hygienic macros try to protect you from understanding what they're doing; they protect me from variable capture, which is exactly what I want in some macros.

153–158

A really good language should be both clean and dirty: cleanly designed, with a small core of orthogonal operators, but dirty in that it lets hackers have their way. C is like this; so were the early Lisps. A real hacker's language will always have a slightly raffish character. At the other end are Ada and Pascal, models of propriety good for teaching and not much else.

116–158

More important than brevity: letting hackers do what they want. Treat your user as a genius who'll need the unanticipated, not a bumbler to protect. Let yourself be second-guessed — a good language is both clean and dirty.

160

5 Throwaway Programs

161

To be attractive to hackers, a language must be good for writing the kinds of programs they want to write.

162

And that means, perhaps surprisingly, that it has to be good for writing throwaway programs.

163

A throwaway program is a program you write quickly for some limited task: a program to automate some system administration task, or generate test data for a simulation, or convert data from one format to another.

164

The surprising thing about throwaway programs is that, like the "temporary" buildings built at so many American universities during World War II, they often don't get thrown away.

165

Many evolve into real programs, with real features and real users.

166

I have a hunch that the best big programs begin life this way, rather than being designed big from the start, like the Hoover Dam.

167

It's terrifying to build something big from scratch.

168

When people take on a project that's too big, they become overwhelmed.

169

The project either gets bogged down, or the result is sterile and wooden: a shopping mall rather than a real downtown, Brasilia rather than Rome, Ada rather than C.

170

Another way to get a big program is to start with a throwaway program and keep improving it.

171

This approach is less daunting, and the design of the program benefits from evolution.

172

I think, if one looked, that this would turn out to be the way most big programs were developed.

173

And those that did evolve this way are probably still written in whatever language they were first written in, because it's rare for a program to be ported, except for political reasons.

174

And so, paradoxically, if you want to make a language that is used for big systems, you have to make it good for writing throwaway programs, because that's where big systems come from.

175

Perl is a striking example of this idea.

176

It was not only designed for writing throwaway programs, but was pretty much a throwaway program itself.

177

Perl began life as a collection of utilities for generating reports, and only evolved into a programming language as the throwaway programs people wrote in it grew larger.

178

It was not until Perl 5 (if then) that the language was suitable for writing serious programs, and yet it was already massively popular.

179

What makes a language good for throwaway programs?

180

To start with, it must be readily available.

181

A throwaway program is something that you expect to write in an hour.

182

So the language probably must already be installed on the computer you're using.

183

It can't be something you have to install before you use it.

184

It has to be there.

185

C was there because it came with the operating system.

186

Perl was there because it was originally a tool for system administrators, and yours had already installed it.

187

Being available means more than being installed, though.

188

An interactive language, with a command-line interface, is more available than one that you have to compile and run separately.

189

A popular programming language should be interactive, and start up fast.

190

Another thing you want in a throwaway program is brevity.

191

Brevity is always attractive to hackers, and never more so than in a program they expect to turn out in an hour.

161–165

To attract hackers, a language must be good for throwaway programs — ones you write quickly for a limited task. The surprising thing is that, like the "temporary" buildings thrown up at American universities during World War II, they often don't get thrown away; many evolve into real programs with real users.

166–169

The best big programs begin life this way, rather than being designed big from the start, like the Hoover Dam. It's terrifying to build something big from scratch; people get overwhelmed, and the result is sterile and wooden — a shopping mall rather than a real downtown, Brasilia rather than Rome, Ada rather than C.

170–178

Another way to get a big program is to start with a throwaway and keep improving it; the design benefits from evolution. So paradoxically, to make a language used for big systems, you must make it good for throwaway programs. Perl is the striking example: not only designed for them but pretty much a throwaway program itself, already massively popular before Perl 5 made it suitable for serious work.

179–191

What makes a language good for throwaway programs? It must be readily available — already installed, not something you set up first. C was there because it came with the OS; Perl, because your sysadmin had installed it. But available means more than installed: an interactive language with a command-line interface beats one you compile and run separately, and should start up fast. And it wants brevity.

160–191

To attract hackers a language must be good for throwaway programs — which often don't get thrown away, but evolve into big systems. That means it must be readily available, interactive, fast to start, and brief.

193

6 Libraries

194

Of course the ultimate in brevity is to have the program already written for you, and merely to call it.

195

And this brings us to what I think will be an increasingly important feature of programming languages: library functions.

196

Perl wins because it has large libraries for manipulating strings.

197

This class of library functions are especially important for throwaway programs, which are often originally written for converting or extracting data.

198

Many Perl programs probably begin as just a couple library calls stuck together.

199

I think a lot of the advances that happen in programming languages in the next fifty years will have to do with library functions.

200

I think future programming languages will have libraries that are as carefully designed as the core language.

201

Programming language design will not be about whether to make your language strongly or weakly typed, or object oriented, or functional, or whatever, but about how to design great libraries.

202

The kind of language designers who like to think about how to design type systems may shudder at this.

203

It's almost like writing applications!

204

Too bad.

205

Languages are for programmers, and libraries are what programmers need.

206

It's hard to design good libraries.

207

It's not simply a matter of writing a lot of code.

208

Once the libraries get too big, it can sometimes take longer to find the function you need than to write the code yourself.

209

Libraries need to be designed using a small set of orthogonal operators, just like the core language.

210

It ought to be possible for the programmer to guess what library call will do what he needs.

211

Libraries are one place Common Lisp falls short.

212

There are only rudimentary libraries for manipulating strings, and almost none for talking to the operating system.

213

For historical reasons, Common Lisp tries to pretend that the OS doesn't exist. And because you can't talk to the OS, you're unlikely to be able to write a serious program using only the built-in operators in Common Lisp.

214

You have to use some implementation-specific hacks as well, and in practice these tend not to give you everything you want.

215

Hackers would think a lot more highly of Lisp if Common Lisp had powerful string libraries and good OS support.

194–198

The ultimate brevity is having the program already written and merely calling it — which brings us to library functions. Perl wins because of its large string libraries, especially important for throwaway programs, which often start as converting or extracting data. Many Perl programs probably begin as a couple library calls stuck together.

199–205

A lot of the advances in the next fifty years will involve library functions, as carefully designed as the core. Design won't be about strong versus weak typing or object-oriented versus functional, but about how to design great libraries. Type-system designers may shudder — it's almost like writing applications! Too bad. Languages are for programmers, and libraries are what programmers need.

206–210

It's hard to design good libraries — not simply writing lots of code. Once they get too big, finding the function can take longer than writing it yourself. Libraries need a small set of orthogonal operators, just like the core, so the programmer can guess what call does what he needs.

211–215

Libraries are one place Common Lisp falls short: only rudimentary string libraries, almost none for talking to the OS, which it pretends doesn't exist. So you can't write a serious program with built-in operators alone — you need implementation-specific hacks that don't give you everything. Hackers would think more highly of Lisp with powerful string libraries and good OS support.

193–215

The ultimate brevity is calling code already written for you, so libraries will be increasingly central — designed as carefully as the core language, from a small set of orthogonal operators. Libraries are where Common Lisp falls short.

217

7 Syntax

218

Could a language with Lisp's syntax, or more precisely, lack of syntax, ever become popular?

219

I don't know the answer to this question.

220

I do think that syntax is not the main reason Lisp isn't currently popular.

221

Common Lisp has worse problems than unfamiliar syntax.

222

I know several programmers who are comfortable with prefix syntax and yet use Perl by default, because it has powerful string libraries and can talk to the os.

223

There are two possible problems with prefix notation: that it is unfamiliar to programmers, and that it is not dense enough.

224

The conventional wisdom in the Lisp world is that the first problem is the real one.

225

I'm not so sure.

226

Yes, prefix notation makes ordinary programmers panic.

227

But I don't think ordinary programmers' opinions matter.

228

Languages become popular or unpopular based on what expert hackers think of them, and I think expert hackers might be able to deal with prefix notation.

229

Perl syntax can be pretty incomprehensible, but that has not stood in the way of Perl's popularity.

230

If anything it may have helped foster a Perl cult.

231

A more serious problem is the diffuseness of prefix notation.

232

For expert hackers, that really is a problem.

233

No one wants to write (aref a x y) when they could write a[x,y].

234

In this particular case there is a way to finesse our way out of the problem.

235

If we treat data structures as if they were functions on indexes, we could write (a x y) instead, which is even shorter than the Perl form.

236

Similar tricks may shorten other types of expressions.

237

We can get rid of (or make optional) a lot of parentheses by making indentation significant.

238

That's how programmers read code anyway: when indentation says one thing and delimiters say another, we go by the indentation.

239

Treating indentation as significant would eliminate this common source of bugs as well as making programs shorter.

240

Sometimes infix syntax is easier to read.

241

This is especially true for math expressions.

242

I've used Lisp my whole programming life and I still don't find prefix math expressions natural.

243

And yet it is convenient, especially when you're generating code, to have operators that take any number of arguments.

244

So if we do have infix syntax, it should probably be implemented as some kind of read-macro.

245

I don't think we should be religiously opposed to introducing syntax into Lisp, as long as it translates in a well-understood way into underlying s-expressions.

246

There is already a good deal of syntax in Lisp.

247

It's not necessarily bad to introduce more, as long as no one is forced to use it.

248

In Common Lisp, some delimiters are reserved for the language, suggesting that at least some of the designers intended to have more syntax in the future.

249

One of the most egregiously unlispy pieces of syntax in Common Lisp occurs in format strings; format is a language in its own right, and that language is not Lisp.

250

If there were a plan for introducing more syntax into Lisp, format specifiers might be able to be included in it.

251

It would be a good thing if macros could generate format specifiers the way they generate any other kind of code.

252

An eminent Lisp hacker told me that his copy of CLTL falls open to the section format.

253

Mine too.

254

This probably indicates room for improvement.

255

It may also mean that programs do a lot of I/O.

218–222

Could a language with Lisp's lack of syntax ever become popular? I don't know — but syntax isn't Lisp's main problem; Common Lisp has worse ones. I know several programmers comfortable with prefix syntax who use Perl by default, because it has powerful string libraries and can talk to the OS.

223–230

There are two possible problems with prefix notation: it's unfamiliar, and it's not dense enough. Conventional wisdom says the first is the real one, but I'm not so sure. Prefix notation makes ordinary programmers panic — but their opinions don't matter. Languages live or die on what expert hackers think, and they might deal with it; Perl syntax can be incomprehensible without hurting Perl's popularity.

231–236

The more serious problem is diffuseness. No one wants to write (aref a x y) when they could write a[x,y]. But there's a way out: treat data structures as functions on indexes and write (a x y) — even shorter than the Perl form.

237–239

We can drop a lot of parentheses by making indentation significant. That's how programmers read code anyway: when indentation and delimiters disagree, we go by indentation. Making it significant would eliminate a common source of bugs and shorten programs.

240–255

Sometimes infix is easier to read, especially for math, so it should probably be a read-macro. We shouldn't be religiously opposed to introducing syntax into Lisp, as long as it translates cleanly into underlying s-expressions; the most egregiously unlispy syntax is in format strings, since format is a language in its own right, and that language is not Lisp.

217–255

Lisp's lack of syntax isn't its main problem; the real issue is diffuseness, not unfamiliarity. Tricks like treating data as functions, significant indentation, and read-macros for infix could make a Lisp denser without abandoning s-expressions.

257

8 Efficiency

258

A good language, as everyone knows, should generate fast code.

259

But in practice I don't think fast code comes primarily from things you do in the design of the language.

260

As Knuth pointed out long ago, speed only matters in certain critical bottlenecks.

261

And as many programmers have observed since, one is very often mistaken about where these bottlenecks are.

262

So, in practice, the way to get fast code is to have a very good profiler, rather than by, say, making the language strongly typed.

263

You don't need to know the type of every argument in every call in the program.

264

You do need to be able to declare the types of arguments in the bottlenecks.

265

And even more, you need to be able to find out where the bottlenecks are.

266

One complaint people have had with Lisp is that it's hard to tell what's expensive.

267

This might be true.

268

It might also be inevitable, if you want to have a very abstract language.

269

And in any case I think good profiling would go a long way toward fixing the problem: you'd soon learn what was expensive.

270

Part of the problem here is social.

271

Language designers like to write fast compilers.

272

That's how they measure their skill.

273

They think of the profiler as an add-on, at best. But in practice a good profiler may do more to improve the speed of actual programs written in the language than a compiler that generates fast code.

274

Here, again, language designers are somewhat out of touch with their users.

275

They do a really good job of solving slightly the wrong problem.

276

It might be a good idea to have an active profiler — to push performance data to the programmer instead of waiting for him to come asking for it.

277

For example, the editor could display bottlenecks in red when the programmer edits the source code.

278

Another approach would be to somehow represent what's happening in running programs. This would be an especially big win in server-based applications, where you have lots of running programs to look at.

279

An active profiler could show graphically what's happening in memory as a program's running, or even make sounds that tell what's happening.

280

Sound is a good cue to problems. In one place I worked, we had a big board of dials showing what was happening to our web servers.

281

The hands were moved by little servomotors that made a slight noise when they turned.

282

I couldn't see the board from my desk, but I found that I could tell immediately, by the sound, when there was a problem with a server.

283

It might even be possible to write a profiler that would automatically detect inefficient algorithms. I would not be surprised if certain patterns of memory access turned out to be sure signs of bad algorithms. If there were a little guy running around inside the computer executing our programs, he would probably have as long and plaintive a tale to tell about his job as a federal government employee.

284

I often have a feeling that I'm sending the processor on a lot of wild goose chases, but I've never had a good way to look at what it's doing.

285

A number of Lisps now compile into byte code, which is then executed by an interpreter.

286

This is usually done to make the implementation easier to port, but it could be a useful language feature.

287

It might be a good idea to make the byte code an official part of the language, and to allow programmers to use inline byte code in bottlenecks.

288

Then such optimizations would be portable too.

289

The nature of speed, as perceived by the end-user, may be changing.

290

With the rise of server-based applications, more and more programs may turn out to be i/o-bound.

291

It will be worth making i/o fast. The language can help with straightforward measures like simple, fast, formatted output functions, and also with deep structural changes like caching and persistent objects.

292

Users are interested in response time.

293

But another kind of efficiency will be increasingly important: the number of simultaneous users you can support per processor.

294

Many of the interesting applications written in the near future will be server-based, and the number of users per server is the critical question for anyone hosting such applications.

295

In the capital cost of a business offering a server-based application, this is the divisor.

296

For years, efficiency hasn't mattered much in most end-user applications.

297

Developers have been able to assume that each user would have an increasingly powerful processor sitting on their desk.

298

And by Parkinson's Law, software has expanded to use the resources available.

299

That will change with server-based applications.

300

In that world, the hardware and software will be supplied together.

301

For companies that offer server-based applications, it will make a very big difference to the bottom line how many users they can support per server.

302

In some applications, the processor will be the limiting factor, and execution speed will be the most important thing to optimize.

303

But often memory will be the limit; the number of simultaneous users will be determined by the amount of memory you need for each user's data.

304

The language can help here too.

305

Good support for threads will enable all the users to share a single heap.

306

It may also help to have persistent objects and/or language level support for lazy loading.

258–265

A good language should generate fast code — but fast code doesn't come primarily from language design. As Knuth pointed out, speed only matters in certain bottlenecks, and one is very often mistaken about where they are. So the way to get fast code is a very good profiler, not strong typing: you only need to declare types in the bottlenecks, and to find out where they are.

266–275

A complaint about Lisp is that it's hard to tell what's expensive, but good profiling would go a long way. Part of the problem is social: designers like to write fast compilers, since that's how they measure their skill, and think of the profiler as an add-on. Yet a good profiler may do more for real programs' speed than a fast-code compiler. Here again, designers do a really good job of solving slightly the wrong problem.

276–284

It might be good to have an active profiler — pushing performance data to the programmer instead of waiting to be asked, displaying bottlenecks in red as you edit, or even making sounds. Sound is a good cue: in one place I worked, a board of dials showing our web servers made a slight noise, and I could tell by the sound when a server had a problem.

285–291

The nature of speed may also be changing: with server-based applications, more programs may be i/o-bound, and the language can help with fast formatted output, caching, and persistent objects.

292–301

Users care about response time, but another efficiency will matter more: how many simultaneous users you support per processor — in the capital cost of a server-based application, this is the divisor. For years efficiency hasn't mattered, since by Parkinson's Law software just expanded to fill ever more powerful processors. Server-based applications change that: hardware and software are supplied together, and users-per-server makes a big difference to the bottom line.

302–306

Sometimes the processor is the limit and execution speed matters most. But often memory is the limit; simultaneous users are set by the memory each user's data needs. The language can help here too: good thread support lets all users share one heap.

257–306

Fast code comes from a good profiler, not from language design — speed only matters in bottlenecks you're often wrong about. Designers build fast compilers to measure their skill but neglect profiling, and server-based applications will change what efficiency even means.

308

9 Time

309

The last ingredient a popular language needs is time.

310

No one wants to write programs in a language that might go away, as so many programming languages do.

311

So most hackers will tend to wait until a language has been around for a couple years before even considering using it.

312

Inventors of wonderful new things are often surprised to discover this, but you need time to get any message through to people.

313

A friend of mine rarely does anything the first time someone asks him.

314

He knows that people sometimes ask for things that they turn out not to want.

315

To avoid wasting his time, he waits till the third or fourth time he's asked to do something; by then, whoever's asking him may be fairly annoyed, but at least they probably really do want whatever they're asking for.

316

Most people have learned to do a similar sort of filtering on new things they hear about.

317

They don't even start paying attention until they've heard about something ten times.

318

They're perfectly justified: the majority of hot new whatevers do turn out to be a waste of time, and eventually go away.

319

By delaying learning VRML, I avoided having to learn it at all.

320

So anyone who invents something new has to expect to keep repeating their message for years before people will start to get it.

321

We wrote what was, as far as I know, the first web-server based application, and it took us years to get it through to people that it didn't have to be downloaded.

322

It wasn't that they were stupid.

323

They just had us tuned out.

324

The good news is, simple repetition solves the problem.

325

All you have to do is keep telling your story, and eventually people will start to hear.

326

It's not when people notice you're there that they pay attention; it's when they notice you're still there.

327

It's just as well that it usually takes a while to gain momentum.

328

Most technologies evolve a good deal even after they're first launched — programming languages especially.

329

Nothing could be better, for a new techology, than a few years of being used only by a small number of early adopters.

330

Early adopters are sophisticated and demanding, and quickly flush out whatever flaws remain in your technology.

331

When you only have a few users you can be in close contact with all of them.

332

And early adopters are forgiving when you improve your system, even if this causes some breakage.

333

There are two ways new technology gets introduced: the organic growth method, and the big bang method.

334

The organic growth method is exemplified by the classic seat-of-the-pants underfunded garage startup.

335

A couple guys, working in obscurity, develop some new technology.

336

They launch it with no marketing and initially have only a few (fanatically devoted) users.

337

They continue to improve the technology, and meanwhile their user base grows by word of mouth.

338

Before they know it, they're big.

339

The other approach, the big bang method, is exemplified by the VC-backed, heavily marketed startup.

340

They rush to develop a product, launch it with great publicity, and immediately (they hope) have a large user base.

341

Generally, the garage guys envy the big bang guys.

342

The big bang guys are smooth and confident and respected by the VCs.

343

They can afford the best of everything, and the PR campaign surrounding the launch has the side effect of making them celebrities.

344

The organic growth guys, sitting in their garage, feel poor and unloved.

345

And yet I think they are often mistaken to feel sorry for themselves.

346

Organic growth seems to yield better technology and richer founders than the big bang method.

347

If you look at the dominant technologies today, you'll find that most of them grew organically.

348

This pattern doesn't only apply to companies.

349

You see it in sponsored research too.

350

Multics and Common Lisp were big-bang projects, and Unix and MacLisp were organic growth projects.

309–311

The last ingredient a popular language needs is time. No one wants to write in a language that might go away, as so many do, so most hackers wait a couple years before even considering one.

312–319

Inventors are often surprised that you need time to get a message through. A friend rarely does anything the first time he's asked, since people ask for things they turn out not to want. Most people filter the same way — they don't pay attention until they've heard about something ten times. By delaying learning VRML, I avoided having to learn it at all.

320–326

Anyone with something new must expect to repeat the message for years. We wrote what was, as far as I know, the first web-server-based application, and it took years to convince people it didn't have to be downloaded; they just had us tuned out. The good news is that simple repetition solves the problem. It's not when people notice you're there that they pay attention; it's when they notice you're still there.

327–332

It's just as well it takes a while to gain momentum. Nothing is better for a new technology than a few years used only by early adopters: sophisticated and demanding, they quickly flush out remaining flaws, you can be in close contact with all of them, and they forgive improvements even when these cause breakage.

333–340

There are two ways new technology gets introduced. Organic growth is the classic underfunded garage startup — a couple guys in obscurity launch with no marketing, have a few fanatically devoted users, and grow by word of mouth until they're big. The big bang is the VC-backed startup: rush to develop a product, launch with great publicity, and immediately (they hope) have a large user base.

341–350

The garage guys envy the big bang guys — smooth, confident, made celebrities by the launch PR. Yet they're often mistaken to feel sorry for themselves: organic growth seems to yield better technology and richer founders, and most dominant technologies today grew organically. You see it in research too: Multics and Common Lisp were big-bang projects; Unix and MacLisp were organic growth.

308–350

A popular language needs time, because hackers wait years before trusting something new. Simple repetition solves this — people notice not when you're there but when you're still there — and the organic growth method beats the big bang.

352

10 Redesign

353

"The best writing is rewriting," wrote E. B. White.

354

Every good writer knows this, and it's true for software too.

355

The most important part of design is redesign.

356

Programming languages, especially, don't get redesigned enough.

357

To write good software you must simultaneously keep two opposing ideas in your head.

358

You need the young hacker's naive faith in his abilities, and at the same time the veteran's skepticism.

359

You have to be able to think how hard can it be? with one half of your brain while thinking it will never work with the other.

360

The trick is to realize that there's no real contradiction here.

361

You want to be optimistic and skeptical about two different things.

362

You have to be optimistic about the possibility of solving the problem, but skeptical about the value of whatever solution you've got so far.

363

People who do good work often think that whatever they're working on is no good.

364

Others see what they've done and are full of wonder, but the creator is full of worry.

365

This pattern is no coincidence: it is the worry that made the work good.

366

If you can keep hope and worry balanced, they will drive a project forward the same way your two legs drive a bicycle forward.

367

In the first phase of the two-cycle innovation engine, you work furiously on some problem, inspired by your confidence that you'll be able to solve it.

368

In the second phase, you look at what you've done in the cold light of morning, and see all its flaws very clearly.

369

But as long as your critical spirit doesn't outweigh your hope, you'll be able to look at your admittedly incomplete system, and think, how hard can it be to get the rest of the way?, thereby continuing the cycle.

370

It's tricky to keep the two forces balanced.

371

In young hackers, optimism predominates.

372

They produce something, are convinced it's great, and never improve it.

373

In old hackers, skepticism predominates, and they won't even dare to take on ambitious projects.

374

Anything you can do to keep the redesign cycle going is good.

375

Prose can be rewritten over and over until you're happy with it.

376

But software, as a rule, doesn't get redesigned enough.

377

Prose has readers, but software has users. If a writer rewrites an essay, people who read the old version are unlikely to complain that their thoughts have been broken by some newly introduced incompatibility.

378

Users are a double-edged sword.

379

They can help you improve your language, but they can also deter you from improving it.

380

So choose your users carefully, and be slow to grow their number.

381

Having users is like optimization: the wise course is to delay it.

382

Also, as a general rule, you can at any given time get away with changing more than you think.

383

Introducing change is like pulling off a bandage: the pain is a memory almost as soon as you feel it.

384

Everyone knows that it's not a good idea to have a language designed by a committee.

385

Committees yield bad design.

386

But I think the worst danger of committees is that they interfere with redesign.

387

It is so much work to introduce changes that no one wants to bother.

388

Whatever a committee decides tends to stay that way, even if most of the members don't like it.

389

Even a committee of two gets in the way of redesign.

390

This happens particularly in the interfaces between pieces of software written by two different people.

391

To change the interface both have to agree to change it at once.

392

And so interfaces tend not to change at all, which is a problem because they tend to be one of the most ad hoc parts of any system.

393

One solution here might be to design systems so that interfaces are horizontal instead of vertical — so that modules are always vertically stacked strata of abstraction.

394

Then the interface will tend to be owned by one of them.

395

The lower of two levels will either be a language in which the upper is written, in which case the lower level will own the interface, or it will be a slave, in which case the interface can be dictated by the upper level.

353–356

"The best writing is rewriting," wrote E. B. White, and it's true for software too. The most important part of design is redesign — and programming languages especially don't get redesigned enough.

357–362

To write good software you must hold two opposing ideas at once: the young hacker's naive faith and the veteran's skepticism. You think how hard can it be? with one half of your brain while thinking it will never work with the other. There's no contradiction: you're optimistic about solving the problem, but skeptical about whatever solution you've got so far.

363–365

People who do good work often think whatever they're working on is no good. Others see it and are full of wonder, but the creator is full of worry. This is no coincidence: it is the worry that made the work good.

366–369

Kept balanced, hope and worry drive a project the way your two legs drive a bicycle. As long as your critical spirit doesn't outweigh your hope, you look at the incomplete system and think, how hard can it be to get the rest of the way?, continuing the cycle.

370–377

In young hackers optimism predominates: they produce something, are convinced it's great, and never improve it. In old hackers skepticism predominates, and they won't dare ambitious projects. Software isn't redesigned enough, because prose has readers but software has users.

378–383

Users are a double-edged sword: they help you improve your language but also deter you. So choose them carefully and be slow to grow their number; having users is like optimization — the wise course is to delay it. And you can usually get away with changing more than you think: introducing change is like pulling off a bandage, the pain a memory almost as soon as you feel it.

384–392

Everyone knows a language shouldn't be designed by committee. But the worst danger is that committees interfere with redesign: changes are so much work that no one bothers, and whatever they decide tends to stay. Even a committee of two blocks redesign — both must agree to change an interface at once, so interfaces tend not to change, though they're one of the most ad hoc parts of a system.

393–395

One solution: design systems as vertically stacked strata of abstraction, so one module owns each interface — the lower level either the language the upper is written in, or a slave whose interface the upper level dictates.

352–395

"The best writing is rewriting" — and the most important part of design is redesign. Good work needs balanced hope and worry, the optimism to start and the skepticism to improve. Choose users carefully, grow slowly, and beware committees, which block redesign.

397

11 Lisp

398

What all this implies is that there is hope for a new Lisp.

399

There is hope for any language that gives hackers what they want, including Lisp.

400

I think we may have made a mistake in thinking that hackers are turned off by Lisp's strangeness.

401

This comforting illusion may have prevented us from seeing the real problem with Lisp, or at least Common Lisp, which is that it sucks for doing what hackers want to do.

402

A hacker's language needs powerful libraries and something to hack.

403

Common Lisp has neither.

404

A hacker's language is terse and hackable.

405

Common Lisp is not.

406

The good news is, it's not Lisp that sucks, but Common Lisp.

407

If we can develop a new Lisp that is a real hacker's language, I think hackers will use it.

408

They will use whatever language does the job.

409

All we have to do is make sure this new Lisp does some important job better than other languages.

410

History offers some encouragement.

411

Over time, successive new programming languages have taken more and more features from Lisp.

412

There is no longer much left to copy before the language you've made is Lisp.

413

The latest hot language, Python, is a watered-down Lisp with infix syntax and no macros.

414

A new Lisp would be a natural step in this progression.

415

I sometimes think that it would be a good marketing trick to call it an improved version of Python.

416

That sounds hipper than Lisp.

417

To many people, Lisp is a slow AI language with a lot of parentheses.

418

Fritz Kunze's official biography carefully avoids mentioning the L-word.

419

But my guess is that we shouldn't be afraid to call the new Lisp Lisp.

420

Lisp still has a lot of latent respect among the very best hackers — the ones who took 6.001 and understood it, for example.

421

And those are the users you need to win.

422

In "How to Become a Hacker," Eric Raymond describes Lisp as something like Latin or Greek — a language you should learn as an intellectual exercise, even though you won't actually use it:

423

Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.

424

If I didn't know Lisp, reading this would set me asking questions.

425

A language that would make me a better programmer, if it means anything at all, means a language that would be better for programming.

426

And that is in fact the implication of what Eric is saying.

427

As long as that idea is still floating around, I think hackers will be receptive enough to a new Lisp, even if it is called Lisp.

428

But this Lisp must be a hacker's language, like the classic Lisps of the 1970s.

429

It must be terse, simple, and hackable.

430

And it must have powerful libraries for doing what hackers want to do now.

431

In the matter of libraries I think there is room to beat languages like Perl and Python at their own game.

432

A lot of the new applications that will need to be written in the coming years will be server-based applications [blocked].

433

There's no reason a new Lisp shouldn't have string libraries as good as Perl, and if this new Lisp also had powerful libraries for server-based applications, it could be very popular.

434

Real hackers won't turn up their noses at a new tool that will let them solve hard problems with a few library calls.

435

Remember, hackers are lazy.

436

It could be an even bigger win to have core language support for server-based applications.

437

For example, explicit support for programs with multiple users, or data ownership at the level of type tags.

438

Server-based applications also give us the answer to the question of what this new Lisp will be used to hack.

439

It would not hurt to make Lisp better as a scripting language for Unix. (It would be hard to make it worse.)

440

But I think there are areas where existing languages would be easier to beat.

441

I think it might be better to follow the model of Tcl, and supply the Lisp together with a complete system for supporting server-based applications.

442

Lisp is a natural fit for server-based applications.

443

Lexical closures provide a way to get the effect of subroutines when the ui is just a series of web pages.

444

S-expressions map nicely onto html, and macros are good at generating it.

445

There need to be better tools for writing server-based applications, and there needs to be a new Lisp, and the two would work very well together.

398–405

All this implies there's hope for a new Lisp. We may have erred in thinking hackers are turned off by Lisp's strangeness; that illusion hid the real problem with Common Lisp: it sucks for doing what hackers want. A hacker's language needs powerful libraries and something to hack, and is terse and hackable; Common Lisp is none of these.

406–414

The good news is it's not Lisp that sucks, but Common Lisp. Develop a new Lisp that's a real hacker's language and hackers will use it — they'll use whatever does the job. History offers encouragement: successive languages have taken more and more from Lisp, and there's not much left to copy before what you've made is Lisp. The latest hot language, Python, is a watered-down Lisp with infix syntax and no macros; a new Lisp would be a natural next step.

415–421

I sometimes think it'd be a good marketing trick to call it an improved version of Python — hipper than Lisp, which to many is a slow AI language with a lot of parentheses. But we shouldn't be afraid to call the new Lisp Lisp. It still has latent respect among the very best hackers — those who took 6.001 and understood it — and those are the users you need.

422–426

In "How to Become a Hacker," Eric Raymond describes Lisp as something like Latin or Greek — worth learning as an exercise even if you won't use it. But a language that makes you a better programmer means a language better for programming — which is in fact what Eric is saying.

427–435

As long as that idea floats around, hackers will be receptive to a new Lisp, even if it's called Lisp. But it must be a hacker's language like the classic Lisps of the 1970s: terse, simple, hackable, with powerful libraries for what hackers want now — string libraries as good as Perl's, plus powerful libraries for server-based applications [blocked]. Remember, hackers are lazy.

436–445

Core language support for server-based applications could be a bigger win, and these also answer what this new Lisp will hack. Better to follow Tcl's model and supply the Lisp with a complete system for them. Lisp is a natural fit — s-expressions map nicely onto html, and macros are good at generating it.

397–445

There's hope for a new Lisp — the real problem isn't strangeness but that Common Lisp sucks for what hackers want. Languages keep absorbing Lisp's features, so a terse, hackable Lisp with powerful libraries for server-based applications could win.

447

12 The Dream Language

448

By way of summary, let's try describing the hacker's dream language.

449

The dream language is beautiful [blocked], clean, and terse.

450

It has an interactive toplevel that starts up fast. You can write programs to solve common problems with very little code.

451

Nearly all the code in any program you write is code that's specific to your application.

452

Everything else has been done for you.

453

The syntax of the language is brief to a fault.

454

You never have to type an unnecessary character, or even to use the shift key much.

455

Using big abstractions you can write the first version of a program very quickly.

456

Later, when you want to optimize, there's a really good profiler that tells you where to focus your attention.

457

You can make inner loops blindingly fast, even writing inline byte code if you need to.

458

There are lots of good examples to learn from, and the language is intuitive enough that you can learn how to use it from examples in a couple minutes.

459

You don't need to look in the manual much.

460

The manual is thin, and has few warnings and qualifications.

461

The language has a small core, and powerful, highly orthogonal libraries that are as carefully designed as the core language.

462

The libraries all work well together; everything in the language fits together like the parts in a fine camera.

463

Nothing is deprecated, or retained for compatibility.

464

The source code of all the libraries is readily available.

465

It's easy to talk to the operating system and to applications written in other languages.

466

The language is built in layers.

467

The higher-level abstractions are built in a very transparent way out of lower-level abstractions, which you can get hold of if you want.

468

Nothing is hidden from you that doesn't absolutely have to be.

469

The language offers abstractions only as a way of saving you work, rather than as a way of telling you what to do.

470

In fact, the language encourages you to be an equal participant in its design.

471

You can change everything about it, including even its syntax, and anything you write has, as much as possible, the same status as what comes predefined.

448–454

The hacker's dream language is beautiful [blocked], clean, and terse, with an interactive toplevel that starts up fast. You write programs for common problems with very little code; nearly all the code is specific to your application, and everything else has been done for you. The syntax is brief to a fault — you never have to type an unnecessary character.

455–460

Using big abstractions you write the first version very quickly. Later, when you optimize, a really good profiler tells you where to focus, and you can make inner loops blindingly fast. There are lots of examples to learn from, and the language is intuitive enough to learn from them in a couple minutes.

461–467

The language has a small core and powerful, highly orthogonal libraries designed as carefully as the core. Everything fits like the parts in a fine camera. Nothing is deprecated or retained for compatibility, and it's easy to talk to the OS. It's built in layers, higher-level abstractions built transparently out of lower-level ones you can get hold of.

468–471

Nothing is hidden that doesn't absolutely have to be. The language offers abstractions only to save you work, not to tell you what to do. In fact it encourages you to be an equal participant in its design: you can change everything, even its syntax, and anything you write has, as much as possible, the same status as what comes predefined.

447–471

The hacker's dream language is beautiful, clean, and terse, with a fast interactive toplevel, a small core, carefully designed orthogonal libraries, and nothing hidden — encouraging you to be an equal participant in its design.

473

Notes

474

[1] Macros very close to the modern idea were proposed by Timothy Hart in 1964, two years after Lisp 1.5 was released. What was missing, initially, were ways to avoid variable capture and multiple evaluation; Hart's examples are subject to both.

475

[2] In When the Air Hits Your Brain, neurosurgeon Frank Vertosick recounts a conversation in which his chief resident, Gary, talks about the difference between surgeons and internists ("fleas"):

476

Gary and I ordered a large pizza and found an open booth. The chief lit a cigarette. "Look at those goddamn fleas, jabbering about some disease they'll see once in their lifetimes. That's the trouble with fleas, they only like the bizarre stuff. They hate their bread and butter cases. That's the difference between us and the fucking fleas. See, we love big juicy lumbar disc herniations, but they hate hypertension...."

477

It's hard to think of a lumbar disc herniation as juicy (except literally).

478

And yet I think I know what they mean.

479

I've often had a juicy bug to track down.

480

Someone who's not a programmer would find it hard to imagine that there could be pleasure in a bug.

481

Surely it's better if everything just works.

482

In one way, it is.

483

And yet there is undeniably a grim satisfaction in hunting down certain sorts of bugs.

485
486

Five Questions about Language Design [blocked]

474

Macros very close to the modern idea were proposed by Timothy Hart in 1964, two years after Lisp 1.5; what was missing were ways to avoid variable capture and multiple evaluation.

477–483

In When the Air Hits Your Brain, neurosurgeon Frank Vertosick recounts a chief resident on surgeons versus internists — surgeons love big juicy disc herniations, internists love the bizarre. It's hard to think of a herniation as juicy, yet I know what they mean: I've often had a juicy bug to track down. A non-programmer would find pleasure in a bug hard to imagine. And yet there is undeniably a grim satisfaction in hunting down certain sorts of bugs.

473–487

Macros close to the modern idea were proposed by Timothy Hart in 1964. On the pleasure of bugs: a neurosurgeon's "juicy" cases mirror the grim satisfaction of hunting down certain sorts of bugs.