ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Bibb <richard.b...@aimhedge.com>
Subject Re: Overloading Mappers
Date Mon, 24 Aug 2009 14:18:35 GMT

Advice taken 8-O

Thanks Clinton


Clinton Begin wrote:
> 
> No!  :-)
> 
> Outside of iBATIS, I've always recommended avoiding method overloading (ad
> hoc polymorphism).  It's just a bad practice.  The method is likely doing
> something different, so give it a good name.
> 
> On rare occasions it makes some sense, like say before Object wrappers,
> having .valueOf() overloaded for each of the primitives was okay (but
> still
> a design flaw due to Java's primitive types).
> 
> But most DAO methods aren't like that.  They do something specific, so the
> name should reflect that.
> 
> Clinton
> 
> 

-- 
View this message in context: http://www.nabble.com/Overloading-Mappers-tp25115777p25116887.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message