Tag: Polymorphism
10 posts
-
[2026] Python Classes | Object-Oriented Programming (OOP) Explained
Learn Python OOP: classes, __init__, self, inheritance, encapsulation, property, magic methods, abstract classes, and polymorphism—with examples.
-
[2026] Go in 2 Weeks #04 | Day 7: Polymorphism Reimagined — Interfaces Without virtual
Go interfaces vs C++ virtual functions: implicit satisfaction, duck typing, io.Reader, io.Writer, small interfaces, any, type assertions, and type switc...
-
[2026] C++ Factory Pattern: Complete Guide | Encapsulating Object Creation & Extensibility
C++ Factory pattern explained: encapsulate creation, Simple Factory vs Factory Method vs Abstract Factory, auto-registration, plugins, and production pa...
-
[2026] C++ Inheritance & Polymorphism: virtual, Interfaces, and Patterns
C++ inheritance and polymorphism: public inheritance, virtual functions, abstract classes, virtual destructors, slicing, template method, and compositio...
-
[2026] C++ Object Slicing: Value Copies, Polymorphism, and Fixes
Object slicing in C++: copying derived objects into base values loses state and breaks virtual dispatch—use references, pointers, and smart pointers.
-
[2026] C++ Virtual Functions and vtables: How Dynamic Binding Works [#33-1]
Interview-ready guide to virtual functions, vtables and vptrs, static vs dynamic binding, override and final, common pitfalls (slicing, dtors, default a...
-
[2026] C++ Strategy Pattern: Complete Guide | Algorithms, Lambdas & std::function
Strategy pattern in C++: polymorphic strategies, function pointers, lambdas, std::function—sorting and compression examples; performance trade-offs for ...
-
[2026] C++ Visitor Pattern Explained | Double Dispatch, std::variant & std::visit
Visitor pattern in modern C++: classic accept/visit vs std::variant + std::visit (C++17), ASTs, trade-offs when adding types vs operations—tutorial for ...
-
[2026] C++ Virtual Functions: Polymorphism, override, and Pure Virtual
Virtual functions in C++: dynamic dispatch, virtual vs non-virtual, pure virtual and abstract classes, virtual destructors, vtables, and slicing pitfalls.
-
[2026] C++ VTable Explained: Virtual Function Tables & Dynamic Dispatch
How C++ vtables and vptrs implement polymorphism: indirect calls, object size, multiple inheritance costs, and optimization with final and NVI.