2

Example with a context (an excerpt from "The Art & Science of Java: An Introduction to Computer Science" by Eric Roberts):

For example, executing the line

println("Top student " + topStudent)

would produce the following output:

Top student = John Doe (#20456)

Had you left out the implementation of the toString method, Java would instead use the default definition of the toString method from the Object class. The result in that case would be something like this

Top student = John Doe@154865

which is rather less informative.

I don't really understand what actually made the author choose to use Java would instead use over Java would have instead used in that sentence. To me personally, would have instead used sounds like a better choice because it makes total sense that if you had done something in the past, something different would have happened, but since you didn't do that, it didn't happen either. What gives?

  • 2
    Neither did the author, probably. Java would have used fits the sentence better. – Tᴚoɯɐuo Apr 27 '15 at 13:17
  • Had you left out means " if you had left" in a guessing sense – Fiona Shoff Apr 27 '15 at 13:20
  • 1
    @Cookie Monster you caught a mistake in the written language -- the tenses don't match up in these two clauses. Either "if you leave out, Java would instead use" or "if you had left out, Java would instead have used." Since "had you left out" is a rather formal variant of "if you had left out," presumably the author/editor's intuition for the "sequence of tenses" in clauses like this got thrown off. – hunter Apr 27 '15 at 13:23
  • 1
    I like the original better than TRomano's version. – snailboat Apr 27 '15 at 16:25
1
  • Executing this line would produce the following output.

I regard "would produce" as employing the present (or possibly future) tense, indefinite aspect, and subjunctive mode.  The subjunctive "would" is more appropriate than the indicative "will" because this is a conditional result of a hypothetical action.  The conditional proposition is suggested by the gerund "executing", and we can't examine the mode of a gerund.

  • Had you left that out, Java would instead use the default.

I regard "had left out" as employing the present tense, perfect aspect, and subjunctive mode.  This subordinate clause presents the conditional proposition.  I regard "would use" exactly the same as I regard "would produce" -- present indefinite subjunctive.

Both "would use" and "would produce" are doing the same job and using the same form.

The conditional proposition in both cases could be purely hypothetical. You need never have executed such a line, and perhaps never will.  You need not have neglected that method, and perhaps never would. 

Had you left the class's method out yesterday (and not fixed it since), Java would instead use the default when it runs your code tomorrow.

 

The "would produce" and "would use" both describe the present (and, because of the meaning of "will", future) behavior depending on the program's condition.  The passage in its entirety is consistent with a present-tense narrative describing hypothetical situations.

I suspect the author wants you to understand that, if you did something different in the past, something would be different in the present.  Your phrasing only suggests that one difference in the past would have caused another difference in the past.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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