ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject RE: [Patch] removed multiple returns from AntTypeDefinition.getTypeClass
Date Thu, 04 Nov 2004 14:52:56 GMT
> From: Kevin Jackson []
> It's not a fix or anything, but IM(very humble)O having one return
> the code easier to understand.

Well, I for one disagree ;-) I always return early for trivial cases,
getting them out of the way, making it obvious that the meat or rest of
a method works only for given validated inputs (pre-conditions of sort).
It also avoids having to scroll down to figure out what happens next,
like the value is returned as-is in this case.

Of course it depends on length of the method and over factors, but
having a single return is not a criteria I rate highly when judging how
a method should be implemented. It's all very much in the eye of the
beholder. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message