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
Post a Comment