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.

The CLR under .NET is referred to as the "Common Language Runtime." It seems that the convention is "runtime" for a noun and "run-time" for the adjective. Is this correct or should it be "runtime" also? I'm inclined to think it should be like the following:

  1. The variable is typed at runtime.
  2. The runtime variable is null.
share|improve this question
1  
You can use "run time", "runtime", or "run-time" for a noun or an adjective. There is no standard spelling. It's a matter of personal preference. Just be consistent. –  Alex B. May 7 '12 at 16:31
    
possible duplicate of When is it necessary to use a hyphen in writing a compound word? –  jwpat7 May 7 '12 at 17:07
    
Several closed questions link to To hyphenate or not? which has a good answer, but When is it necessary to use a hyphen in writing a compound word? may be more useful. Also see closed When is it appropriate to use a hyphen?, –  jwpat7 May 7 '12 at 17:10
    
@AlexB has it right: pick a style, and be consistent. Any will do. –  Dan H May 7 '12 at 17:19
    
I would personally go with runtime for both. –  Noah May 7 '12 at 18:14

6 Answers 6

up vote 7 down vote accepted

I (as a programmer and linguist) would pretty much always use runtime.

I think you might be building too much into the idea that runtime is an 'adjective' in compounds such as runtime environment. The word still remains more noun-like than adjective-like[*] in such cases and there's little motivation for inventing a special spelling in that case. And if you look at examples of actual articles, textbooks etc, I think you'll find most authors come to the same conclusion.

In the Java and C# APIs, I also don't think you'll find a case of it being spelt "RunTime" rather than "Runtime".

[*] cf. "more flexible environment"~"*more runtime environment"; "this environment is flexible"~"*this environment is runtime" etc. These aren't perfect tests, because "adjective" vs "noun" don't really constitute a perfect dichotomy. But you can see that "runtime" is more at the 'nouny' than the 'adjectivy' end of the scale in these cases.

share|improve this answer
    
I think the "more ______" test is creative, but I don't know if "more-nouny" captures the concept. "Semi-annual" is clearly an adjective. The fact that we don't say "more semi-annual" doesn't make it "more-nouny"; I think it just puts "semi-annual" (and "run-time" and the like) into a category called "non-comparable". –  Dan H May 7 '12 at 17:18
    
No, it's not a perfect test, and that's one of the reasons why I say the "noun"~"adjective" dichotomy is not perfect. And if it was the only test, you'd probably end up with a categorisation more like the one you suggest. However, in this instance, if you have to shoehorn the word 'runtime' into one of the two categories, on balance (for the reasons mentioned here plus various others) it fits better into the category of "noun". –  Neil Coffey May 7 '12 at 17:27
    
P.S. I think the presence of the hyphen in "semi-annual" is a red herring, though (or at least, a different use of the hyphen), in case that was what was influencing you to want to include it in "run-time". –  Neil Coffey May 7 '12 at 17:29
    
I like Neil's explanation of it being a compounded noun, but it does raise the interesting question of when does a word cross over to being an adjective. I remember when I was learning Norwegian that compounded nouns were very common, and runtime has the feel of a Germanic compounding. Maybe this is one of those cases where our linguistic roots are rising up to challenge us again. Thanks! –  John Dahle May 7 '12 at 22:06

The OED gives:

run time n. Computing the time at or during which a program or other task runs (often contrasted to the time at or during which a program is compiled); the length of time taken by the execution of a program or task.

  • 1964 Math. Computation 18 486 Separate run-time indications assured us > that we did not have overflow.
  • 1972 Nucl. Physics B. 48 123 Every model can in principle be simulated by every simulation method for a sufficiently long run time of a computer.
  • 1982 InfoWorld 14 June 77/2 Prompting for data entry during run time.
  • 2002 CGI Nov. 56/2 Their program can quickly recompile the programs at run-time according to whichever graphics capabilities are available.

But you really have to check what your publisher’s preferences are. The O’Reilly house style guide uses runtime with neither space nor hyphen as both a noun and adjective. However, when it comes to compiling, they use compile-time as the adjective and compile time with a space as the noun.

This presents problems of parallism failure, however, so in the Fourth Edition of Programming Perl, I’m a bit more flexible than that (pace their in-house proofreaders). For example:

  • The following are all equivalent to one another, though the first two compute the symbol table entry at compile time, while the last two do so at run time: ...
  • As you see, with RE2, the run time no longer grows proportionately to the input size, but only to the regex size.
  • That’s a handy idiom to know anyway—assigning a sub {} to a typeglob is the way to give a name to an anonymous subroutine at run time.
  • use charnames (); # no compile-time \N{}, just run-time functions
  • A dynamic scope also extends to the end of the innermost enclosing block, but in this case, “enclosing” is defined dynamically at runtime rather than textually at compile time.

As you see, sometimes I won against the in-house proofreaders, and alas, sometimes I didn’t. :( Runtime looks cleaner, but it doesn’t work well when you intermix compile time and compile-time, and you certainly aren’t going to get away with *compiletime.

Of course, when run time means the running time of a program, that’s something quite different from a runtime library and such.

share|improve this answer
    
A major flaw with the OED entry as I see it is that it doesn't separate out adequately the two different senses of "runtime"/"run time". When referring to an actual measured execution time of a run, it would tend to be written separately, but otherwise as a single word "runtime". –  Neil Coffey May 7 '12 at 20:13
    
P.S. I don't see that it matters that "runtime" is written as a single word whereas "compile time" isn't. Obviously, "compile time" is a longer form, plus, unlike "runtime", it tends to refer more literally to "the time of compiling" rather than a set of libraries/environment. –  Neil Coffey May 7 '12 at 20:17

The phrase originated as"run time" -- the time it took for an execution cycle "run" of a computer program or other event.

Over time it began being applied as an adjective in computer science, and thus became hyphenated, like: "run-time system" or "run-time execution".

As the word became more and more commonly used in computer science, folks started dropping the hyphen and now you'll usually just see "runtime". But it's not universal ... my browser spellchecker still thinks that's a typo :)

This NGram shows the relative usage of "run-time" and "runtime", illustrating the change in popularity in recent years.

To address Neil's comment below, consider this definition of runtime library from Wikipedia:

a runtime library is a special program library used by a compiler, to implement functions built into a programming language, during the execution (runtime) of a computer program.

And also consider the definition of execution/runtime:

run time, run-time, runtime, or execution time is the time during which a program is running (executing), in contrast to other phases of a program's lifecycle such as compile time, link time, load time, etc.

share|improve this answer
    
Lynn -- I'm suspicious that this would be the origin of this use of runtime. I don't think it's got anything to do with execution time (in terms of 'time'='measurement'), but simply that it refers to the necessary environment at the time (='on the occasion of', not to do with actual measurement) of 'running' (as opposed to compiling) the program. –  Neil Coffey May 7 '12 at 17:31
    
@NeilCoffey - I have expanded my answer a bit. It's not about the duration per se (like, the measurement of 5 seconds) but the /time period/ that the program was running. –  lindanaughton May 7 '12 at 17:59
    
+1 to Lynn for using Ngrams in Google for describing the historical usage. I hadn't thought about that! –  John Dahle May 15 '12 at 13:21

Runtime, as far as I know, is a noun. If you see it used as an adjective, it's an attributive noun. Based on its derivation, it's likely that "run-time" is used by someone who is not aware that "runtime" is an accepted word. Or they are writing in steampunk style.

share|improve this answer
    
Any cites for these opinions? –  jwpat7 May 7 '12 at 17:02

Whenever I refer to the time a programn takes for execution (= measurement of time), I spell it run time rather than runtime. If, however, I want to stress the program's status of being running, I call it runtime, e.g. in a phrase like "... variables are determined at runtime".

I cannot tell why I do it this way round, one certainly could reason for the opposite, but I would always opt for different spellings rather than one because they indicate different meanings.

share|improve this answer

This is not really an answer because I'm also lost but I'd like to point out something that seems to be overlooked in these three ways to write "runtime", "run time" or "run-time".

I would risk saying that all three mean different things, that I believe should be applied in different cases:

  • run time: this is how much time your program took to execute. If, on unix, you run time program, you get as output the program's run time (or it's execution time). It doesn't sound right to me to refer to this as the program's runtime or run-time.

  • run-time: this is something that happens during a program's execution, in contrast with load-time (when it is loaded) or compile-time (when it is being compiled). Note that like "run time", I venture that "compile time" is the time it takes to compile, and compile-time is something that happens during a program's compilation (such as compile-time optimizations --- note again that "compile time optimizations" would also be valid if I was referring to optimizations that shorten the time an application takes to be compiled, not optimizations to the application itself).

  • runtime: this is what something is (e.g. "the Java runtime"). Again, it does not seem correct to me to say something like "My program is executed by the Java run time".

Does it really make sense to join all these uses together under one word? It seems to me that their distinction is useful.

share|improve this answer

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.