using eloquent interfaces pledge programming opposing an interface


i have seen arguments controlling eloquent interfaces slight locking classes use interface. justification seems forcing others way interface pledge improved decoupling classes grant easier testing.



example:



public interface icut
{
vacant cut();
}
public category blade : icut
{
vacant icut.cut()
{
//cut something
}
}


and blade object:



icut obj = new knife();
obj.cut();


would advise slight interface implementation? since why not?



edit:
also, given i am controlling an eloquent interface following work.



knife obj = new knife();
obj.cut();


Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?