On Tuesday, 17 May 2022 at 09:30:12 UTC, forkit wrote:
On Tuesday, 17 May 2022 at 04:37:58 UTC, Ali Çehreli wrote:


In you OOP example, I am curious why you chose Shape to be an interface, rather than a base class.

You can inherit from multiple interfaces, but only from one base class. So if you need multiple inheritance, better use interfaces. Especially at the first level of objects I would almost always use only interfaces, no classes. I consider this better design.

Reply via email to