Skip to main content
1 of 4
CodesInChaos
  • 5.8k
  • 4
  • 22
  • 27

Instance methods (unlike free functions or extension methods) can can't be added from other modules.

This becomes more of a restriction when you consider interfaces which can only be implemented by the instance methods. You can't define an interface and a class in different modules and then use code from a third module to bind them together. A more flexible approach, like Haskell's type classes should be able to do that.

CodesInChaos
  • 5.8k
  • 4
  • 22
  • 27