Is Julia's way of OOP superior to C++/Python? Why Julia doesn't use class-based OOP?

I wrote a little about the idea behind traits here, not sure if that’s helpful. Maybe this blogpost by @oxinabox is helpful.

The problem with explaining traits is that it’s really hard to find a small self contained example of why they’re useful. For any small snippet, defining a supertype is just better. Traits really become useful when you have multiple packages interacting that don’t want to all share a supertype, or in cases where you really want a type to have two supertypes.

4 Likes