Tag: class
6 posts
-
C++ struct vs class: The One Language Difference and the Conventions Built on It
struct and class differ only in default member and base-class access. What that means for inheritance, POD and aggregates, and when to pick which keyword.
-
Python Classes: Class vs Instance Attributes, super() and the MRO, @property and Dataclasses
How Python classes work: the shared mutable class attribute bug, __new__ vs __init__, super() and the MRO, @property, dataclasses and __hash__.
-
JavaScript Classes | ES6 Class Syntax Explained
JavaScript ES6 classes explained: what class syntax desugars to, getters/setters, static blocks, inheritance, private fields (#), and the this-binding pitfall.
-
C++ this Pointer: Chaining, const Methods, Lambdas, and CRTP
The implicit this pointer in non-static member functions: disambiguation, method chaining, self-assignment checks, lambda captures.
-
C++ static Members: Static Data & Static Functions
Class static members shared by all instances: declaration vs definition, ODR, thread safety, the static init/deinit order fiasco, singletons, factories, and C++17 inline static in headers.
-
C++ Classes and Objects: Constructors and Access Control
Learn C++ OOP from scratch: classes, constructors, public/private access, destructors, const member functions, and the Rule of Three/Five with working.