In C# classes can have interfaces that can have multiple implementations. How do you do that in smalltalk?
First of all you typically don't need interfaces, because if an object implements the same messages as another one it can replace it. In Java and C# you cannot do this unless they are in the same hierarchy, thus you need interfaces.
After a discussion today with a coworker of mine it seems to me that the answer is any class could be considered an interface because any class can be passed in a message to any other class.
Any number of classes in smalltalk can respond to the same message, therefore you don't need interfaces as per C# and java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With