3 ms·
For data structures, an invariant is something that must hold true at the end of all its public APIs. For example a doubly-linked list may have to break invaria
by MontagFTB 2y ago
For data structures, an invariant is something that must hold true at the end of all its public APIs. For example a doubly-linked list may have to break invariants around its pointers while in the middle of a splice or insert. But at the end of those public routines they must all be valid and conformant to the type’s requirements.
- lupire 2y agoRight. A "system" is the observable parts. If you have a good wall of abstraction, you have freedom in the internals and security in the observables.