A Journey Into Non-Virtual Polymorphism
| A Journey into Non-Virtual Polymorphism 2 Who Doesn’t Recognize This?? 1990 Borland Turbo C++Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 3 Background ● Experience with (https://medium.com/@rudmerriam)Cppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 4 Polymorphism ● Greek: “many forms” (Obligatory statement) ● The use of a single symbol to represent types – Polymorphic Invokable ● Polymorphism is type based dispatch The challenge is the variableCppcon 2023 | Rud Merriam | A Journey into Non-Virtual Polymorphism 5 Polymorphic Variables ● Base0 码力 | 43 页 | 536.84 KB | 5 月前3Reusable Code & Reusable Data Structures
32SHARING CODE AND DATA: GENERIC CLASSES Curiously Recurring Template Pattern (CRTP) Compile-time polymorphism Generic interface, algorithms, data in templated base class Customization points in derived class 38.2RUNTIME RUNTIME POLYMORPHISM POLYMORPHISM 39RUNTIME POLYMORPHISM Design decision! Strong coupling between types Share base classes and common interface 40RUNTIME POLYMORPHISM Design decision! Strong base classes and common interface Interface must have same meaning for all types 40.1RUNTIME POLYMORPHISM Design decision! Strong coupling between types Share base classes and common interface Interface0 码力 | 132 页 | 14.20 MB | 5 月前3Object Oriented Programming
Object-Oriented Programming Key Ideas Class Inheritance Polymorphism Early and Late Binding Virtuality override final Template method Destructor Interfaces Liskov substitution principle con- /destructor Slicing ShadowingObject-Oriented Programming Key Ideas Class Inheritance Polymorphism Early and Late Binding Virtuality override final Template method Destructor Interfaces Separation from interface and implementationObject-Oriented Programming Key Ideas Class Inheritance Polymorphism Early and Late Binding Virtuality override final Template method Destructor Interfaces0 码力 | 38 页 | 752.99 KB | 5 月前3Balancing Efficiency and Flexibility: Cost of Abstractions in Embedded Systems
6800 2Motivation 3 direct interaction with hardware references encapsulation inheritance polymorphism large library support exception handling function overloading C compatibility templates overhead move semantics namespaceOverview Hardware Abstraction Layer ⚫ Encapsulation ⚫ Inheritance ⚫ Polymorphism + ⚫ Template Metaprogramming ⚫ Concepts ⚫ Constant Expressions ⚫ Immediate Functions ⚫ Parameter in, speed), calculate_bitmask(pin)); } }; 32Inheritance Compiles to the same binary. 33Polymorphism 34Moving Higher Microcontroller Peripheral 35 HAL External Peripheral Interface STM320 码力 | 75 页 | 2.12 MB | 5 月前3Six Ways for Implementing Math Expressions Calculator
Yocto, QNX, AOSP, Bazel, AGLSix ways for Implementing Math Expressions Calculator A walk through polymorphism, smart pointers, templates, concepts and more Amir KirshPicture by @ciura_victor : https://ciura com/a/192d90699cd08eb5 (Or just skip to this:) http://coliru.stacked-crooked.com/a/0387ba22e796fc7a A quick polymorphism exercise 14 6 ways for implementing math expressions calculator, Amir Kirsh// what is bothering Amir Kirsh Design Pros: Simple usage, short and concise, hiding implementation details, 🎯 polymorphism with value semanticsDo we need derived classes for Sum and Exp? 39 6 ways for implementing math0 码力 | 63 页 | 1.85 MB | 5 月前3Design Patterns: Facts and Misconceptions
change Design patterns Examples: GoF Patterns: Visitor, Strategy, Observer, … External Polymorphism … Implementation Details How is a design implemented? Which features are used? Implementation pattern.41 Common misconceptions about design patterns: Design patterns are limited to runtime polymorphism; Design patterns are limited to OO programming; Design patterns are language specific idioms; execute() = 0 CommandAn Example from the Standard Library 44 Alternatively we could use static polymorphism: template< typename OP > void doSomething( OP command ); This form of the command pattern is0 码力 | 88 页 | 17.31 MB | 5 月前3C++ Under the Hood
the Hood – Polymorphism During Construction27 C++ Under the Hood – Polymorphism During Construction28 C++ Under the Hood – Polymorphism During Construction29 C++ Under the Hood – Polymorphism During Construction30 (construct members)33 C++ Under the Hood – Construction (set this v_table)34 C++ Under the Hood – Polymorphism During Construction35 C++ Under the Hood – Construction36 C++ Under the Hood – Construction37 (construct members)38 C++ Under the Hood – Construction (set this v_table)39 C++ Under the Hood – Polymorphism During Construction40 C++ Under the Hood – Construction41 C++ Under the Hood – ConstructionC++0 码力 | 168 页 | 13.55 MB | 5 月前3Objeet Oriented Python Tutorial
........................................................ 42 OOP IN PYTHON – INHERITANCE AND POLYMORPHISM ........................................................... 44 Inheritance ................ ........................................................................................ 45 Polymorphism (“MANY SHAPES”) ............................................................................. and build applications.. Major pillars of Object Oriented Programming (OOP) are Inheritance, Polymorphism, Abstraction, ad Encapsulation. Object Oriented Analysis(OOA) is the process of examining a0 码力 | 111 页 | 3.32 MB | 1 年前3Newer Isn't Always Better
Template Pattern (CRTP) • ~1995 Deducing This • C++23 Timelineatomosspace.com | 48 • Run-Time Polymorphism • Quintessential Object Oriented Method • Overused Original Trend – Virtual Functionsatomosspace { // ... } }; Original Code – Virtual Functionsatomosspace.com | 50 • Compile Time Polymorphism • Force a Downcast from the Parent to Access Child Elements • Explicit Cast New Trend – Curiously .. } }; New Code – CRTPatomosspace.com | 52 • C++23 Feature • Simplifies Compile Time Polymorphism New Trend – Explicit Object Parameter/Deducing Thisatomosspace.com | 53 struct NetworkConnection0 码力 | 60 页 | 1.34 MB | 5 月前3Agda User Manual v2.6.2
… where Prop₀ : Set₁, Prop₁ : Set₂, Prop₂ : Set₃, etc. Like Set, Prop also supports universe polymorphism (see universe levels), so for each ℓ : Level we have the sort Prop ℓ. For example: True : ∀ {ℓ} indeed define: Prod : List₁ Set → Set Prod [] = ⊤ Prod (A :: As) = A × Prod As Universe polymorphism To allow definitions of functions and datatypes that work for all possible universes Setᵢ, Agda the standard hierarchy of universes Setᵢ, this second hierarchy Setωᵢ does not support universe polymorphism. This means that it is not possible to quantify over all Setωᵢ at once. For example, the expression0 码力 | 348 页 | 414.11 KB | 1 年前3
共 246 条
- 1
- 2
- 3
- 4
- 5
- 6
- 25
相关搜索词
JourneyIntoNonVirtualPolymorphismReusableCodeDataStructuresObjectOrientedProgrammingBalancingEfficiencyandFlexibilityCostofAbstractionsinEmbeddedSystemsSixWaysforImplementingMathExpressionsCalculatorDesignPatternsFactsMisconceptionsC++UndertheHoodObjeetPythonTutorialNewerIsnAlwaysBetterAgdaUserManualv26.2