If you want to ensure that your class(es) comply with certain protocol, just write a test that covers the protocol and checks that class instances will understand messages you want it to understand. But there's no way to restrict your class to comply to whole protocol once at a time, because tools made in a way, that you populating your class with methods, each method is add individually and compiled separately, and the only validation, the compiler is capable of is basically compliance with smalltalk syntax. And it doesn't cares about higher lever requirement, like whether your class turns to be 'valid' because of a method you just added, ready to be used and for what. Even more, there's no way to connect all those 'interface' formalisation garbage rules with send sites (the place where you actually invoking one or another method of one of potetial implementor of your interface), so it makes no sense to do any (pre)validation on whatever class/object in a system in order to check whether it conforms with it or not. That's " Why don't Smalltalk or Smalltalklike languages have checked interfaces?" -- Best regards, Igor Stasenko.
- Re: [Pharo-users] How does Boolean ifTrue work? CodeDmitry
- Re: [Pharo-users] How does Boolean ifTrue wor... p...@highoctane.be
- Re: [Pharo-users] How does Boolean ifTrue wor... Thierry Goubier
- Re: [Pharo-users] How does Boolean ifTrue... CodeDmitry
- Re: [Pharo-users] How does Boolean ifTrue... Esteban A. Maringolo
- Re: [Pharo-users] How does Boolean ifTrue... CodeDmitry
- Re: [Pharo-users] How does Boolean ifTrue... jtuc...@objektfabrik.de
- Re: [Pharo-users] How does Boolean ifTrue... Henrik Sperre Johansen
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis
- Re: [Pharo-users] How does Boolean ifTrue... Igor Stasenko
- Re: [Pharo-users] How does Boolean ifTrue... Igor Stasenko
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis
- Re: [Pharo-users] How does Boolean ifTrue... Johan Fabry
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis
- Re: [Pharo-users] How does Boolean ifTrue... Johan Fabry
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis
- Re: [Pharo-users] How does Boolean ifTrue... Denis Kudriashov
- Re: [Pharo-users] How does Boolean ifTrue... Igor Stasenko
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis
- Re: [Pharo-users] How does Boolean ifTrue... Igor Stasenko
- Re: [Pharo-users] How does Boolean ifTrue... Dimitris Chloupis