Fundamental Concepts of Object Oriented Programming
Video Statistics and Information
Channel: Computer Science
Views: 36,790
Rating: 4.9621015 out of 5
Keywords: Object Oriented Programming, OOP, abstraction, encapsulation, inheritance, polymorphism, object, entity, class, type, attribute, field, property, property procedure, operation, behaviour, method, function, procedure, instantiate, constructor, class library, DLL, dynamic link library, override, base class, subclass, superclass, programming, code, computer science, computing, A level
Id: m_MQYyJpIjg
Channel Id: undefined
Length: 9min 15sec (555 seconds)
Published: Sun Nov 01 2020
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Replace polymorphism with composition where possible.
i like this explanation from /r/rust : https://www.reddit.com/r/rust/comments/jrgwkn/can_rust_be_considered_object_oriented/gbt6rzk/
The claim is that inheritance was a hack to implement polymorphism, and what you want is Interfaces / Concepts / Traits / TypeClasses
It doesn't undermine the whole point of inheritance and it's not a hack. The problem is people often insist on presenting examples that are full of inconsistencies. Internally, within our software, there are plenty of clean hierarchies that are perfectly well modelled with inheritance, which works very well and is very flexible in those cases. It's because they are specifically created as hierarchies, and are not just some squishy set of relationships that may exist in various real world scenarios that so often get used to demonstrate the failures of OOP and/or inheritance.