Programming Languages · Cluster
Objects and Modules
Dispatch, encapsulation, and linking units.
- 01 Vtable Layout and the Cost of a Virtual Call How virtual method slots are assigned, why overrides reuse a slot, how multiple inheritance adjusts the this pointer, and what the indirection costs at run time.
- 02 Prototype Chains and Delegation-Based Dispatch How property lookup walks a prototype chain, why methods are stored once per prototype instead of once per object, and where the chain design costs lookup time.
- 03 What a Private Field Actually Hides How access control is checked, why private members remain reachable through reflection or linking tricks, and why the module rather than the class is the enforceable boundary.
- 04 The Fragile Base Class Problem in Compiled Hierarchies Why adding a virtual function or a data member to a published base class breaks already-compiled clients, which changes are binary compatible, and how interfaces avoid it.
- 05 Inline Caches and Polymorphic Call Sites How a call site learns the shapes it has seen, what a megamorphic site costs, and why cache invalidation is the hard part of making dynamic dispatch fast.
- 06 Method Resolution Order in Multiple Inheritance How C3 linearisation produces a consistent method order from a class graph, why depth-first search fails on diamonds, and what the monotonicity property forbids.
- 07 Symbol Visibility, Linkage, and the One Definition Rule How exported, hidden, and local symbols differ, why an inline function in a header can violate the one definition rule across shared libraries, and what the linker can detect.
- 08 Applicative and Generative Functors in Modular Type Checking Why two applications of the same functor may or may not produce compatible abstract types, how path-based strengthening decides it, and what sealing hides.
- 09 Trait Coherence and Orphan Rules in Open Worlds Why a global instance table needs an ownership restriction, how orphan rules prevent overlapping implementations, and what coherence costs downstream crates.
- 10 Module Initialization Order and Cyclic Dependencies How linkers, loaders, and language runtimes order module initialisation, why import cycles produce partially initialised modules, and where the guarantees stop.