Property-Based Declarative Containers in C++ - Charles Bay - CppNow 2019
Channel: CppNow
Date: 10/06/2019

http://cppnow.org
—

Property Based Declarative Containers in C++ - Charles Bay - CppNow 2019

Presentation Slides, PDFs, Source Code and other presenter materials are available at: http://cppnow.org/history/2019/talks/
—

Complex domains with volatile concerns are increasingly converging on “declarative” APIs to provide a consistent and high-level abstraction from which the developer may reason about system status, configuration, and behavior. Declarative APIs present an illusion of simplicity and consistency, hiding the volatile transformations that occur within the running system, and the edge cases and interactions among coupled concerns. A declarative approach is especially well-suited to remain stable, while permitting the internal system behavior to change implementation and evolve over time. 

A “declarative container” similarly presents this illusion of consistency, and simplicity: Properties are extracted to describe the contents of a container, but the container implementation remains opaque. This presents an interface independent of the data layout and possibly evolving algorithms used to maintain invariants within that container. 

Declarative containers are in contrast to C++ std:: containers which are decidedly non-opaque. Whereas the std:: containers guarantee data layout and specify Big-O traversal complexity, a declarative container is assumed to be opaque, and is interrogated only through property extraction. As a result: Algorithms express differently, because the declarative container interface is not based on item iteration. 

We discuss a unified model of declarative property-based containers that provide the expressive simplicity of a declarative API, while still enabling the efficiency and control offered through std:: containers, iterators, and algorithms. The declarative container opaquely aggregates domain-specific types, and we explore the authoring of domain-specific algorithms reliant upon the properties exposed by the container. No iterators are invalidated or harmed in this process (and indeed, iterators serve no purpose whatsoever in the declarative container interface).
— 

Charles Bay
F5
Fort Collins, CO, USA

Software developer with 25+ years experience in large-scale and distributed systems in performance-sensitive environments including real-time processing, performance visualization, embedded systems, time-sensitive processing of large data sets, hardware status-and-control, and instrument/process/sub-assembly 
—

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
---

*--*

---