Sdk: RunTimeError is misspelled in the test status files

Created on 15 Nov 2017  路  4Comments  路  Source: dart-lang/sdk

The proper camel case spelling of "run-time error" should be RunTimeError and it should be changed in the test status files.

If not, we should then switch to CompiletimeError and MissingCompiletimeError (which is horrible) for consistency.

area-test

Most helpful comment

TL;DR: "RuntimeError" and "CompileTimeError" are each consistent with current usage even though not consistent with each other.

I have sunk more of my life into hyphenation and concatenation rules than probably anyone should, mainly because I need to make sure I apply a correct, consistent style in my books.

The short answer is that there are no context-free rules for which word pairs are separate words ("real estate"), hyphenated ("three-year-old son"), or single words ("website"). The general rules are:

  • Over time, a new compound word begins as separate words ("web site"), becomes hyphenated ("web-site"), and eventually coalesces into a single word ("website") if it is frequently used enough. So the answer for how a compound word is punctuated is mostly a matter of history and popularity. The "correct" answer for any given word usually requires consulting word lists in a style guide like the Chicago Manual of Style.

  • Compound words that have not become a single word (like "keyboard") are typically hyphenated when used as an adjective preceding a noun ("up-to-date schedule") but not when used as a standalone noun phrase ("schedule is up to date"). This is not always true, but it usually is. It's "post office box", not "post-office box" even though "post office" is a compound word.

In this specific case, we're in a weird spot because "run time" is in a transition period. Wikipedia lists both "run time" and "runtime" when referring to the execution phase as a noun. When referring to the part of the system, they use "runtime" or "run-time". The examples related to computing in the OED use "run-time" for both the noun and adjective forms.

Since our readers are in a computing context, I think it's best to follow the norms of other tech sources, since the wider English community tends to lag that. We're using "runtime" as an adjective in "runtime error", so looking for that form, I see:

Given that, I think it should be "runtime", no hyphen or space, when used as an adjective. When CamelCased, the "t" stays lowercase.

"Compile time error" is different. If you Google, most people tend to use "compile error" and omit "time" entirely. I see 2,380,000 results for "compile time error", 2,430,000 results for "compile-time error", and only 16,700 results for "compiletime error".

"Compile time" as a compound word is much less common than "run time" (unsurprising since many more people run programs than compile them), so it doesn't appear to have gone through the coalescing process that "runtime" has yet. Maybe it will at some point, but the idiomatic style today is still open form.

If the discrepancy really bothers you, one way to dodge it is to use the more common term "compile error" and eliminate "time" entirely. It's also shorter. "Static error" would work too.

Now, when are we going to talk about "timeout"? :)

All 4 comments

TL;DR: "RuntimeError" and "CompileTimeError" are each consistent with current usage even though not consistent with each other.

I have sunk more of my life into hyphenation and concatenation rules than probably anyone should, mainly because I need to make sure I apply a correct, consistent style in my books.

The short answer is that there are no context-free rules for which word pairs are separate words ("real estate"), hyphenated ("three-year-old son"), or single words ("website"). The general rules are:

  • Over time, a new compound word begins as separate words ("web site"), becomes hyphenated ("web-site"), and eventually coalesces into a single word ("website") if it is frequently used enough. So the answer for how a compound word is punctuated is mostly a matter of history and popularity. The "correct" answer for any given word usually requires consulting word lists in a style guide like the Chicago Manual of Style.

  • Compound words that have not become a single word (like "keyboard") are typically hyphenated when used as an adjective preceding a noun ("up-to-date schedule") but not when used as a standalone noun phrase ("schedule is up to date"). This is not always true, but it usually is. It's "post office box", not "post-office box" even though "post office" is a compound word.

In this specific case, we're in a weird spot because "run time" is in a transition period. Wikipedia lists both "run time" and "runtime" when referring to the execution phase as a noun. When referring to the part of the system, they use "runtime" or "run-time". The examples related to computing in the OED use "run-time" for both the noun and adjective forms.

Since our readers are in a computing context, I think it's best to follow the norms of other tech sources, since the wider English community tends to lag that. We're using "runtime" as an adjective in "runtime error", so looking for that form, I see:

Given that, I think it should be "runtime", no hyphen or space, when used as an adjective. When CamelCased, the "t" stays lowercase.

"Compile time error" is different. If you Google, most people tend to use "compile error" and omit "time" entirely. I see 2,380,000 results for "compile time error", 2,430,000 results for "compile-time error", and only 16,700 results for "compiletime error".

"Compile time" as a compound word is much less common than "run time" (unsurprising since many more people run programs than compile them), so it doesn't appear to have gone through the coalescing process that "runtime" has yet. Maybe it will at some point, but the idiomatic style today is still open form.

If the discrepancy really bothers you, one way to dodge it is to use the more common term "compile error" and eliminate "time" entirely. It's also shorter. "Static error" would work too.

Now, when are we going to talk about "timeout"? :)

I do think self-consistency is important and that parallel things should use parallel constructions. It helps the reader because they don't have to wonder if you're making an important distinction or not. And it helps the writer on a team of writers because they don't have to guess what to write.

Here it's not much effort and I don't think we'd be too far away from current usage if we just adopted the simple rules: (1) "run time" and "compile time" are noun phrases describing times, because they are parallel and "compiletime" is ugly, (2) the adjective forms are "run-time" and "compile-time" because they are parallel, they are a single adjective not two, and "compiletime" is ugly.

Then we can ask how hyphenated words are camel-cased. I don't really know what the rule is, but it should be consistent and, again, "compiletime" is still ugly.

We do use "runtime" in Dart, but we use it as jargon describing the run-time system like the VM or the dart2js JS runtime. I think that's fine, but here it's parallel to "compiler". If we use the same nouns "runtime" for the time and "runtime" for a Dart run-time system, then we lose the ability to distinguish the adjective forms "runtime" and "runtime" which I would actually miss. (The noun forms are easy because "runtime" as in "run-time system" normally has an article and "runtime" as in "run time" normally does not.)

(I also think runtimeType was a mistake because that's a type used in the run-time system, but nobody asked me.)

Or else we get way out ahead of the curve and go with runtimeerror, compiletimeerror, and missingCompiletimeerror.

I don't think we'd be too far away from current usage

I think those are about as authoritative as we could hope to be.

Was this page helpful?
0 / 5 - 0 ratings