JeffBezanson / phdthesis

phd thesis document source
162 stars 25 forks source link

consistent hyphenation #7

Closed JeffBezanson closed 9 years ago

JeffBezanson commented 9 years ago

For some reason I am not too good at this. Specifically run time and dynamically typed appear both with and without hyphens.

jiahao commented 9 years ago

Google n-grams data: screen shot 2015-01-19 at 5 27 48 pm screen shot 2015-01-19 at 5 28 10 pm

You're welcome.

JeffBezanson commented 9 years ago

Thanks.

I wonder if there is a difference between "at run time" and "the runtime system".

jiahao commented 9 years ago

The OED defines "run time" as execution time:

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.

(The OED lists 4 examples of usage; two are hyphenated and the other two are not.)

I would consider 'runtime' to refer to the system, e.g. "The Julia runtime is a library."

jiahao commented 9 years ago

Wikipedia claims that both 'run-time system' and 'runtime system' are acceptable spellings. The former hyphenation looks like a disambiguating hyphen - run-time system = system at (run time) as opposed to run of (time system), long-range order = order at (long range) as opposed to long (range order).

JeffBezanson commented 9 years ago

Ok, I think I'll adopt "runtime system" and "at run time".

alanedelman commented 9 years ago

Cool. I always wonder about semicircle vs semi-circle

image

StefanKarpinski commented 9 years ago

For what it's worth, I have the same problem. Worsened by the analogy with "compile time" – and clearly "compiletime" is not a word :-\

jiahao commented 9 years ago

Consider: "compile time", but "compile-time semantics".

stevengj commented 9 years ago

The guideline is that you hyphenate compound adjectives, not nouns. "At run time" is using "run time" as a noun phrase, hence no hyphen. "run-time compilation" is using "run time" as a compound adjective modifying "compilation", and hence it is good style (at least in many style guides) to hyphenate it as an indication of associativity: "run" modifies "time", and together "run-time" modifies "compilation".

When a compound becomes common enough, sometimes people begin to elide the hyphen, e.g. "run-time compilation" becomes "runtime compilation", or "every-day prices" becomes "everyday prices". I think the main thing is to pick a widespread spelling and stick with it consistently.

Some style guides suggest hyphenating compounds only when there is some ambiguity, but I prefer to just consistently hyphenate compound adjectives. There is (at least) one exception: almost all style guides recommend that you never hyphenate compounds using an adverb ending in "ly", such as "easily baked desserts" (there is never any parsing ambiguity in this case, because an adverb can only modify the adjective, not the noun).

jiahao commented 9 years ago

Also, "data flow analysis".

screen shot 2015-01-21 at 11 04 16 pm