note 94248 rejected from language.oop5.interfaces by danbrown

From: Date: Sun, 25 Oct 2009 13:05:35 +0000
Subject: note 94248 rejected from language.oop5.interfaces by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162046@lists.php.net to get a copy of this message
Note Submitter: activepost at gmail dot com ---- I have an ambiguity about interfaces in programming languages I've worked with(PHP and Java). Everywhere I heard that an interface is just a way for enforcing subclasses to include all the functions declared in the interface. This seems completely clear but the ambiguity begins when it seems that sometimes interfaces do certain actions(Especially or maybe always in internal interfaces). For example I’ve seen a simple class does iteration by just implementing an interface and by removing the implemented interface the class iteration does not work! I’ve also seen that in Java when you implement an interface the “Event Handling” does work and without implementing its interfaces it doesn’t! I really appreciate if someone makes it clear for me to some extent.

« previous php.notes (#162046) next »