3

Consider someone is writing a message (or a question at StackOverflow). The context is following:

In my code, I have the following line:
int foo = Bar();

However, the compiler returns an error:
line 42: Bar() is unknown function

I'm puzzled to choose a proper verb instead of "returns". I've seen people using various verbs for it, but I stuck every time I read it:

  • "returns" can be confused with a function return value;
  • "throws" is for exceptions;
  • "prints" has a little sense as the compiler output is not always printed;
  • "outs", "outputs", or "gives" do not sound professional;
  • "the compiler complains" sounds a bit like personification of the compiler;

What is the proper verb in this situation?

7
  • 3
    I would go with "generates", but I don't have a problem with any of the others you list. Jan 5, 2013 at 6:27
  • @PeterRowell "a compiler generates an error"? Sounds better than the ones I've listed. Jan 5, 2013 at 6:34
  • 2
    "Compiler reports an error" sounds more appropriate. It does not necessarily "fail" or "return", it can carry on and report more further errors.
    – SK-logic
    Jan 5, 2013 at 11:33
  • 1
    Well then, go with "emits."
    – Blrfl
    Jan 5, 2013 at 16:10
  • 2
    or 'vomits'....
    – James
    Jan 5, 2013 at 16:28

3 Answers 3

5

"Compiler reports an error" sounds appropriate and is actually used in literature.

It does not necessarily "fail" or "return", because it can carry on and report more further errors, warnings or notes.

2

I would go with

Compile fails with the error "Fizzy buzzy Bizzy fuzzy"

I would stay far away from throw, also print and return aren't particularly great but throw is a downright misnomer.

1
  • It's a common workaround, but in the context of the question, it sounds a bit cheating: not "compilation+verb", but "compiler+verb". Nevertheless, +1. :) Jan 5, 2013 at 9:18
2

You are quite right that neither "return" nor "print" fits this situation well. To describe it accurately would require a longer verb phrase such as "compilation fails with an 'unknown function' error" or "results in an 'unknown function' error".

Luckily, the verb is the least important part of a question title - I'd say that it is completely unnecessary. What matters is that you manage to describe the situation and the error type, e.g. "'Unknown function' error with in-line declaration". Combined with the Tag "Java" that tells someone browsing the overview all they need to know.

1
  • Not just the "Java" tag, but any tag that correctly identifies the language the code is written in. Jan 5, 2013 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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