8

A friend and I were debating on the origin of the word "compiler". A quick google search led me to discover that Grace Hopper coined the term. But I'm not sure how or on what basis did she coin the term, which is what I was wondering.

As far as I know, a "compiler" would sound like something that brings or put things together. But that's not a very accurate description of what a compiler does, which translates one computer language into another. So one would think that the term "translator" is more suited than "compiler". Despite that, the compiler term was coined, and I would like to understand why.

11
  • I'll be interested to know the answer too, because I agree, translator does sound better. "Compiler" would seem to apply more to what is traditionally called a "linker".
    – Fraser Orr
    Commented Dec 8, 2014 at 15:45
  • 4
    @FraserOrr: From WP: "The first compiler was written by Grace Hopper, in 1952, for the A-0 programming language. The A-0 functioned more as a loader or linker than the modern notion of a compiler."
    – Dan Bron
    Commented Dec 8, 2014 at 15:47
  • 2
    You need to understand that "compiling" a program, at that time, involved running stacks of punch cards through a card reader (sometimes twice). Often one would select components of a program as individual decks of cards that you would then stack together. The computer would read the cards, spit out more cards, then you would read those in.
    – Hot Licks
    Commented Dec 8, 2014 at 17:12
  • So the term seems to be referring to the fact that you're compiling different cards together into one program.
    – Jez
    Commented Dec 8, 2014 at 18:28
  • 1
    @Hugo - Yes, rather than physically juggling punched cards, Hopper's scheme automated the process to an extent. The point is that "compiling" the pieces together was much more significant (at that time) than analyzing syntax or translating semantics or whatever.
    – Hot Licks
    Commented Dec 8, 2014 at 22:49

5 Answers 5

5

Wikipedia gives the evolution of the term:

Towards the end of the 1950s, machine-independent programming languages were first proposed. Subsequently several experimental compilers were developed. The first compiler was written by Grace Hopper, in 1952, for the A-0 programming language.The A-0 functioned more as a loader or linker than the modern notion of a compiler. The first autocode and its compiler were developed by Alick Glennie in 1952 for the Mark 1 computer at the University of Manchester and is considered by some to be the first compiled programming language. The FORTRAN team led by John Backus at IBM is generally credited as having introduced the first complete compiler in 1957. COBOL was an early language to be compiled on multiple architectures, in 1960.

http://en.wikipedia.org/wiki/Compiler#History

The earliest recorded use in the OED is from 1953:

1953 Computers & Automation May 3 If a compiling routine or compiler is used, when a word is examined, the required subroutine is transcribed..into a running program.

More specifically, it's from an article called "Compiling Routines" by Grace Hopper. For more info and an extract of exactly what Hopper meant by compiling -- copying subroutines around and adjusting memory locations -- see http://longstreet.typepad.com/thesciencebookstore/2014/09/jf-grace-hopper-1953-grace-murray-hopper-compiling-routines-incomputers-and-automation-volume-2-no4-may-1953-11.html

3
  • 1
    If Hopper was trying to describe a program that acts similar to a modern linker, where different routines are gathered together, then the word "compiler" is very suitable. According to the comment by Dan Bron, this is the case. I guess the word compiler changed into its modern definition over time, and the word "linker" was assigned to what used to be called the compiler. At least this is from what I understood from these answers and the comments.
    – 9a3eedi
    Commented Dec 9, 2014 at 4:56
  • 1
    A quote from Hopper's original 1953 article that supports what @9a3eedi says about the "compiler" being the "linker", is the following (see next comment, because of char limitations. ) It shows that Hopper was talking about "operative subroutines" that were much like what we call libraries today, and meant to be reused. So the "compiler" would (as is the etymological root of it) take from many places and place them into one.
    – BipedalJoe
    Commented Feb 20, 2023 at 8:06
  • 1
    "Subroutines are carefully planned, both to conserve memory space an operate with as much speed as possible. Naturally, when effort and ingenuity been expended upon such subroutines, the desire to use them again in another program is strong. This desire to use again a good subroutine however, immediately poses the problem of locating it in the computer's memory. For an "operative subroutine", i.e., a subroutine which carries out a complete mathematical operation, two courses are available. These lead to the interpretive method and the compiling method. " page 2
    – BipedalJoe
    Commented Feb 20, 2023 at 8:07
7

An addition source regarding the origin the term itself:

Between October of 1951 and May of 1952 I wrote a compiler. Now, there was a curious thing about it: it wasn't what you'd call one today, and it wasn't what you'd call a "language" today. It was a series of specifications. For each subroutine you wrote some specs. The reason it got called a compiler was that each subroutine was given a "call word," because the subroutines were in a library, and when you pull stuff out of a library you compile things. It's as simple as that.

Grace M. Hopper; Keynote Address to the ACM SIGPLAN History of Programming Languages (HOPL) Conference (June 1-3, 1978), in Richard L. Wexelblat (ed.); History of Programming Languages, p.10 (1981)

1
  • Very good answer!
    – BipedalJoe
    Commented Feb 20, 2023 at 8:49
1

A programming language compiler is at one end of a spectrum of translating programs;
at the other end is the programming language interpreter.
Both may exist for a given language.

A compiler produces a machine code file from a written program, but does not execute it.
Typically compiled languages include FORTRAN, C, and Pascal.

An interpreter executes commands in a written program, but does not produce a code file.
Typically intepreted languages include Java, awk, and Python.

The meaning of compile is nicely summed up in this dictionary definition:

• produce (something, esp. a list, report, or book) by assembling information collected from other sources : the local authority must compile a list of taxpayers.
• collect (information) in order to produce something :
the figures were compiled from a survey of 2,000 schoolchildren.
• accumulate (a specified score) : the 49ers have compiled a league-leading 14–2 record.

The machine code generated by a compiler is a different "language", hence "from other sources".
It is collected together in order to produce something (results of running the program).
It is accumulated over several readings of the program to produce a final product.

As for the etymology of compile, it comes from Latin compilare ‘plunder or plagiarize.’
Make of that what you will.

1
  • 1
    Java isn't an interpreted language.
    – nnnnnn
    Commented Nov 16, 2021 at 23:46
0

If you want a simple answer: It is called a compiler because it gathers (compiles) a lot of information about the source code.

A compiler does a lot more than that, but since the compiler phase is first (even in modern compilers), that's the name that stuck. This is a good thing... otherwise we'd be saying "compiler / code generator" which is a mouthful.

2
  • 2
    What does your answer provide that isn't in the 7-year-old accepted answer?
    – user888379
    Commented Nov 16, 2021 at 19:08
  • It's more concise.
    – TomOnTime
    Commented Nov 18, 2021 at 17:07
0

"Compiler" is derived from the human activity of compiling ballistic tables (a task subsequently performed with software). Maybe. I recently received an email from my great uncle, who worked with early computer languages, and my attempt to verify his assertion about the origin of the term "compiler" brought me to this SE question. I'm having trouble determining whether he is correct or not, but I figured I'd share his perspective with the SE community.

Computers. The first language I learned was FORTRAN IV. That was 1963. In the military (1966-70) I learned COBOL. During Y2K I probably could have earned a handsome salary re-writing programs written in COBOL. They’re probably still around. Re-writing systems with millions of lines of code is a very risky business. Anyway, in graduate school I learned PL/1. So I knew three languages (I actually knew more: ever heard of SNOBOL?) that survived (and still survive?) after decades. And the computers they ran on survived for decades. I was programming an IBM/360 into the 90s.

When I worked at the bank (1964-66) I wrote assembly language code. It wasn’t actually my job, but it reduced the boredom. Philosophically, the point of higher-level languages was to move from a language that made it easier for the computer to understand to a language that made it easier for the user to express his problem. There were fears that compilers (the term goes back to people who used to compile ballistic tables) would not be able to successfully translate user statements (e.g., X=X+!) into machine code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .