Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

When programming, we usually write text files in some programming language. These source files are fed into a compiler that compiles them into binary files.

My question is whether to say:

  • we compile the source files, or
  • we compile the binary files?

Is one of the two more correct than the other?

share|improve this question
4  
To close-voters: This is not off-topic. He's asking about the proper idiomatic construction of to compile, which is clearly within our scope. –  JSBձոգչ Jun 30 '11 at 13:06
    
Actually, he is asking if he should say "compile the source files," or "compile the binary files." "Source file" and "binary file" are not defined from an English dictionary. –  kiamlaluno Jun 30 '11 at 13:22
    
Very simply, compile means different things in everyday language, and in computer engineering. Only Ham & Bacon explained this tension properly. –  Joe Blow Jun 30 '11 at 16:11
add comment

6 Answers

up vote 9 down vote accepted

To address your question specifically, "compile" in computing terms takes the sources as its direct object.

We compile the source files.

"Compile" doesn't take the binaries as a direct object; they are more of an indirect object that we "compile into." You could say:

We compile to the binary files.

but it sounds a bit strange and isn't common.

What might possibly confuse you is that if what we are working on has an overall name, we can use that as a direct object:

I need to compile GStreamer.
He is compiling the server now.

share|improve this answer
add comment

Compile

  1. To gather into a single book.

  2. To put together or compose from materials gathered from several sources: compile an encyclopedia.

  3. Computer Science To translate (a program) into machine language.

Yes, we compile the source files into binary files

EDIT: Well, strictly speaking, the proper usage would be to compile binary files from sources but no one in IT uses compile in this way: Google Ngrams

The closest would be compile a program, but since program is used for both sources and binaries, it's not clear which of them is meant.

share|improve this answer
    
Interesting that the meaning is flipped when used in software! –  jackgill Jun 30 '11 at 12:50
    
@jackgill Actually no. We gather the program's instructions from multiple source files and put them in one binary file (simply speaking). It corresponds with common meaning of this word. –  Philoto Jun 30 '11 at 12:53
    
What I mean is that we say compile an encyclopedia. The verb is applied to the finished product. In software, it's applied to the pieces that make up the finished product. –  jackgill Jun 30 '11 at 12:55
4  
The traditional meaning of compile can be used both ways, You can compile the letters into a book. or you can compile a book out of the letters. I'm not sure it can't be used both ways for software as well; wouldn't you say "These binaries were compiled on June 3"? –  Peter Shor Jun 30 '11 at 13:14
3  
"to compile binary files from sources, but no one in IT uses compile in this way" - the shortened form "to compile from source" is quite common. –  Piskvor Jun 30 '11 at 13:38
show 5 more comments

It depends whether or not you are using it in the context of computing language or not:

In non-computing language, or in normal English, "compiled" is used to mean 'put together' e.g.:

We compiled a dictionary.

However, in computing, "compiler" is defined:

(intransitive, computing) To be successfully processed by a compiler into executable code.

A source code would be compiled, in computing language.

So, its the context of the usage. But in either case, they both mean that the files have been made into binary files.

N.B. "We compiled the source files" in normal English could be misunderstood for you putting together the source files, so if I was in a situation outside of computing, I wouldn't use compile in that way.

Hope that helps!

share|improve this answer
    
"its the context" -> "it's the context" –  Peter Mortensen Jun 30 '11 at 15:13
add comment
  • Compile sources into binary
  • Compile binary from sources

both are valid, just the same as

  • Assemble a kit of parts into a model airplane
  • Assemble a model airplane from a kit of parts
share|improve this answer
add comment

As a programmer, I can attest to both usages being correct.

  • I compile binaries.
  • We compiled binaries.
  • The binary is compiled from source.
  • The binary compiled correctly.
  • The source is compiled as a binary.

There are no set rules as to how to use the word compile in computer science or which word should follow (source or binary).

Technically, the code in the source is translated into assembly language code, and is then compiled into an executable (binary file). The entire process is a few steps, and so it's not easy to explain as if it were black and white. Different compilers do different things in order to compile the source file into a binary file. So it's safe to say that we programmers compile binaries (via compilers), and we compile sources (via text editors).

share|improve this answer
add comment

I wholeheartedly agree with Philoto's "to compile binary files from sources", as well as with the related comments.

I'd just like to point out that I frequently see the intransitive form quoted by "Ham and Bacon", used like:

The sources compile.

(The sources are successfully processed into machine language.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.