Should we rename overloaded methods?
- by Mik378
Assume an interface containing these methods :
Car find(long id);
List<Car> find(String model);
Is it better to rename them like this?
Car findById(long id);
List findByModel(String model);
Indeed, any developer who use this API won't need to look at the interface for knowing possible arguments of initial find() methods.
So my question is more general :
What is the benefit of using overloaded methods in code since it reduce readability?