Tuesday, May 5, 2015

tense - Is "I >am having< a code which ... " acceptable?


On StackOverflow I often see this:



I’m having a code which (does such and such, followed by a fragment of code)



Is I am having a code grammatically correct? I think it is incorrect, and that it should be, I have some code, but I continue to see it more and more frequently.


Is it grammatically correct, or is it a common error? If it is correct, why?




Answer



"I am having a code" doesn't make sense, whereas "I have some code" does make sense.


"A code" might be used for, say, an identification code, which is unique, but "code" as used here more likely means "a piece of code" like a script, or a coherent block of computer instructions.


"Am having" implies that something is taking place over a span of (present) time, while "have" implies possession; possession is the more likely meaning here. "I am having a problem with this code" expresses a logical situation where the "am having" construction makes sense.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...