Tag

polymorphism

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
Jun 15, 2025 · Fundamentals

How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse

This article explains C++ polymorphism, shows how virtual functions and inheritance break tight coupling, improve code reuse, simplify extensions, and enhance maintainability, and demonstrates its role in common design patterns such as Strategy and Factory Method with clear code examples.

C++OOPcode reuse
0 likes · 20 min read
How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse
Deepin Linux
Deepin Linux
May 11, 2025 · Fundamentals

Understanding C++ Virtual Function Tables (vtable) and Their Memory Layout

This article explains how C++ implements runtime polymorphism through virtual function tables, detailing their structure, memory placement, how they enable dynamic binding, and illustrating usage with single, multiple inheritance and practical code examples.

C++inheritancememory layout
0 likes · 17 min read
Understanding C++ Virtual Function Tables (vtable) and Their Memory Layout
php中文网 Courses
php中文网 Courses
Apr 30, 2025 · Backend Development

Understanding Polymorphism in PHP: Types, Code Examples, and Practical Applications

This article explains PHP's polymorphism—covering method overriding, simulated method overloading, interface polymorphism, traits, abstract classes, magic methods, and performance considerations—while providing clear code examples and discussing real‑world uses such as plugin systems, testing mocks, middleware, and strategy patterns.

OOPPHPTraits
0 likes · 9 min read
Understanding Polymorphism in PHP: Types, Code Examples, and Practical Applications
php中文网 Courses
php中文网 Courses
Mar 31, 2025 · Fundamentals

Understanding Inheritance and Polymorphism in Python OOP

This article explains the core object‑oriented programming concepts of inheritance and polymorphism in Python, detailing their advantages, syntax, method overriding, and practical examples that demonstrate code reuse, extensibility, and flexible interfaces through class hierarchies and duck‑typing.

OOPPythoninheritance
0 likes · 7 min read
Understanding Inheritance and Polymorphism in Python OOP
Test Development Learning Exchange
Test Development Learning Exchange
Mar 6, 2025 · Fundamentals

Understanding Class Inheritance in Python: Basics, Overriding, Polymorphism, super() and Advanced Applications

This article explains Python class inheritance—from basic single inheritance and method overriding to polymorphism, super() calls, multiple inheritance, and design‑pattern implementations—providing code examples, usage scenarios, and best‑practice recommendations for writing reusable, extensible object‑oriented code.

OOPPythondesign patterns
0 likes · 10 min read
Understanding Class Inheritance in Python: Basics, Overriding, Polymorphism, super() and Advanced Applications
Test Development Learning Exchange
Test Development Learning Exchange
Jan 19, 2025 · Fundamentals

Understanding Classes and Objects in Python: Definitions, Instantiation, Attributes, Methods, Inheritance, Polymorphism, and Encapsulation

This article introduces Python's object‑oriented programming fundamentals, explaining how to define classes, instantiate objects, differentiate class and instance attributes, and use various method types, followed by practical examples of inheritance, polymorphism, and encapsulation to build well‑structured, maintainable code.

OOPclassesencapsulation
0 likes · 7 min read
Understanding Classes and Objects in Python: Definitions, Instantiation, Attributes, Methods, Inheritance, Polymorphism, and Encapsulation
Top Architecture Tech Stack
Top Architecture Tech Stack
Dec 9, 2024 · Fundamentals

Performance Impact of Clean Code Practices: A C++ Case Study

This article examines how strict adherence to clean‑code principles in C++—such as using polymorphism, limiting function size, and avoiding internal knowledge—affects runtime performance, comparing virtual‑function hierarchies, switch‑based implementations, and table‑driven approaches, and revealing up to fifteen‑fold speed differences.

C++Performanceclean code
0 likes · 21 min read
Performance Impact of Clean Code Practices: A C++ Case Study
Test Development Learning Exchange
Test Development Learning Exchange
Oct 30, 2024 · Fundamentals

Understanding Python Modules, Packages, Classes, and Inheritance

This guide explains Python modules, packages, class definitions, object creation, inheritance, and polymorphism, providing clear examples and code snippets to illustrate how to organize code, import components, and apply object‑oriented principles in practice.

ModulesPythonclasses
0 likes · 8 min read
Understanding Python Modules, Packages, Classes, and Inheritance
Test Development Learning Exchange
Test Development Learning Exchange
Sep 25, 2024 · Fundamentals

Duck Typing and Polymorphism in Python

This article explains duck typing and polymorphism in Python, two fundamental object-oriented programming concepts, with practical code examples demonstrating how objects can be treated based on their behavior rather than their type.

Dynamic TypingPythonduck typing
0 likes · 8 min read
Duck Typing and Polymorphism in Python
Deepin Linux
Deepin Linux
Aug 13, 2024 · Fundamentals

C++ Interview Topics: Smart Pointers, Memory Management, Polymorphism, and More

This article provides a comprehensive overview of common C++ interview questions, covering smart pointer implementations, memory management techniques, object-oriented concepts such as polymorphism and virtual functions, STL containers, threading, and modern C++ features like move semantics and coroutines.

C++ConcurrencyModern C++
0 likes · 64 min read
C++ Interview Topics: Smart Pointers, Memory Management, Polymorphism, and More
IT Services Circle
IT Services Circle
Jun 9, 2024 · Fundamentals

Understanding Type Erasure in C++ for Polymorphic Design

This article explains the concept of type erasure in C++, demonstrating how to achieve polymorphic behavior without a common base class by using wrapper classes, templates, and container storage, and provides multiple implementation approaches with complete code examples.

C++TemplatesType Erasure
0 likes · 11 min read
Understanding Type Erasure in C++ for Polymorphic Design
php中文网 Courses
php中文网 Courses
Apr 2, 2024 · Fundamentals

Understanding Polymorphism in PHP: From Basic Example to Static and Dynamic Polymorphism

This article explains the concept of polymorphism in computer science, analyzes a non‑polymorphic PHP product class, demonstrates how inheritance and method overriding create a flexible, extensible design, and also covers static polymorphism via method overloading with illustrative code examples.

OOPPHPinheritance
0 likes · 8 min read
Understanding Polymorphism in PHP: From Basic Example to Static and Dynamic Polymorphism
Deepin Linux
Deepin Linux
Dec 20, 2023 · Fundamentals

C++ Interview Questions: Polymorphism, Vtables, Memory Alignment, STL Containers, and Multithreading Locks

This article presents a comprehensive C++ interview guide covering dynamic polymorphism, vtable mechanics, static vs virtual functions, memory alignment benefits, iterator invalidation in vector and map, erase‑remove idiom, map implementation details, and common synchronization primitives used in multithreaded programming.

C++LocksMultithreading
0 likes · 12 min read
C++ Interview Questions: Polymorphism, Vtables, Memory Alignment, STL Containers, and Multithreading Locks
php中文网 Courses
php中文网 Courses
Oct 12, 2023 · Backend Development

Understanding Encapsulation in PHP: Data Hiding, Readability, and Inheritance

This article explains how encapsulation in PHP enables data hiding and access control through private and protected members, improves code readability and maintainability, and serves as a foundation for inheritance and polymorphism, illustrated with clear class examples.

OOPPHPdata hiding
0 likes · 5 min read
Understanding Encapsulation in PHP: Data Hiding, Readability, and Inheritance
php中文网 Courses
php中文网 Courses
Jun 29, 2023 · Backend Development

Understanding PHP Dispatch Mechanism and Method Overriding

This article explains PHP's dispatch mechanism, showing how the runtime selects the appropriate method based on an object's actual class, and demonstrates polymorphism through a simple Animal‑Dog‑Cat example with complete code and output explanations.

DispatchOOPmethod overriding
0 likes · 3 min read
Understanding PHP Dispatch Mechanism and Method Overriding
Architecture Digest
Architecture Digest
Mar 6, 2023 · Fundamentals

The Performance Cost of Clean Code: How Following Clean‑Code Rules Can Slow Down Your Program

This article examines how strict adherence to clean‑code principles—such as using polymorphism, keeping functions tiny, and avoiding switch statements—can dramatically increase the number of CPU cycles required for simple area‑calculation loops, presenting benchmark results that show performance penalties of up to fifteen‑fold.

C++Performancebenchmark
0 likes · 20 min read
The Performance Cost of Clean Code: How Following Clean‑Code Rules Can Slow Down Your Program
IT Services Circle
IT Services Circle
Feb 9, 2023 · Fundamentals

Understanding C++ Polymorphism: Vtable Layout, Multiple Inheritance, and Thunks

This article explains how C++ implements runtime polymorphism through virtual function tables, analyzes the memory layout of single‑ and multiple‑inheritance classes using gcc and gdb, and clarifies the role of thunks and offset adjustments for correct virtual calls.

C++GDBMultiple Inheritance
0 likes · 20 min read
Understanding C++ Polymorphism: Vtable Layout, Multiple Inheritance, and Thunks
macrozheng
macrozheng
Feb 21, 2022 · Fundamentals

When Inheritance Breaks Your Code: Why Composition Often Wins

This article critiques the over‑idealization of object‑oriented programming, explaining how inheritance can create tight coupling and hidden bugs, why encapsulation may leak state, the limits of polymorphism, and how modern stateless service architectures favor composition and functional approaches.

OOPStatelesscomposition
0 likes · 13 min read
When Inheritance Breaks Your Code: Why Composition Often Wins
JD Retail Technology
JD Retail Technology
Jan 19, 2022 · Backend Development

Applying Domain-Driven Design and Polymorphic Architecture to E‑commerce Product Detail Pages

This article shares practical experience of using Domain‑Driven Design to refactor an e‑commerce product detail page, detailing domain decomposition, relationship‑network design, polymorphic logic handling, and two concrete case studies that illustrate how to support both online and offline sales scenarios with minimal impact on existing services.

DDDDomain-Driven DesignMicroservices
0 likes · 13 min read
Applying Domain-Driven Design and Polymorphic Architecture to E‑commerce Product Detail Pages