Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
3  
I would go with "generates", but I don't have a problem with any of the others you list. –  Peter Rowell Jan 5 '13 at 6:27
    
@PeterRowell "a compiler generates an error"? Sounds better than the ones I've listed. –  bytebuster Jan 5 '13 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 '13 at 11:33
1  
Well then, go with "emits." –  Blrfl Jan 5 '13 at 16:10
2  
or 'vomits'.... –  James Jan 5 '13 at 16:28
show 2 more comments

3 Answers

up vote 5 down vote accepted

"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.

share|improve this answer
add comment

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.

share|improve this answer
    
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. :) –  bytebuster Jan 5 '13 at 9:18
add comment

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.

share|improve this answer
    
Not just the "Java" tag, but any tag that correctly identifies the language the code is written in. –  Bart van Ingen Schenau Jan 5 '13 at 11:34
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.