[Pharo-project] add: message declared in Collection
Does anyone know why the #add: message is declared in Collection as subclassResponsibility if then some subclasses need to cancel the message raising a shouldNotImplement exception? Why isn't just declared in the classes that really should answer that message? Thanks. Diego. -- View this message in context: http://forum.world.st/add-message-declared-in-Collection-tp3706883p3706883.h... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
I *assume* it is a lesser-of-evils decision, drawing attention to the need to create an appropriate implementation for an offending collection and letting explicitly opt-out, classes for which #add: does not make sense. Done correctly, one is informed that #add: is deliberately not available or that the class in question needs to be fixed. Just a guess... Bill ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of dimacamp [dimacamp@hotmail.com] Sent: Saturday, July 30, 2011 5:19 PM To: pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] add: message declared in Collection Does anyone know why the #add: message is declared in Collection as subclassResponsibility if then some subclasses need to cancel the message raising a shouldNotImplement exception? Why isn't just declared in the classes that really should answer that message? Thanks. Diego. -- View this message in context: http://forum.world.st/add-message-declared-in-Collection-tp3706883p3706883.h... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (2)
-
dimacamp -
Schwab,Wilhelm K