Wednesday, April 21, 2010

Caught or Catched?

Yeah, I know English, and not too bad, either.

Yesterday at work I was pair programming with a young teammate and we banged out some Java code like this:

try {
doSomething();
} catch (Exception e) {
processException();
}

And she was describing the flow while we were debugging to figure out why something wasn't working and she said "the exception should be catched here" and I automatically said "caught" and she said "sorry, caught".

But thinking about it a little more...

Maybe catched is okay. In this case, catch is a Java keyword that coincides with an English word. And describing what it's doing it could very well be that catched is a proper description of a keyword expressed in English.

For sure, if we wrote "caught" in the code it wouldn't compile...

No comments:

Post a Comment