CppCon 2017: Odin Holmes “Agent based class design”

preview_player
Показать описание


Abstracting a set of functionalities into a class which provides a higher level interface often requires tough design decisions. Users who do not have the exact requirements for which the abstraction is optimized will suffer a syntactic or run time overhead as a result. Alexandrescu's famous "policy-based design" provides a mechanism to allow the user to extend and customize an existing abstraction in order to fine-tune its functionality for many different use cases. This is however limited to use cases where each policy more or less represents a compile time strategy pattern.

Alas, not everything is a strategy pattern. In this talk I will explore the viability of a more agent-pattern-like paradigm where each policy knows its requirements and publishes its capabilities. In this paradigm, glue code connecting any valid set of policies is automatically generated using template metaprogramming. This allows much more powerful customizations while maintaining static linkage.

Odin Holmes: Auto-Intern GmbH, CEO/CTO



*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Odin: Starting on slide 61, watching again in 2019 this reminds me of a recent talk on "[Boost].DI".

JohnDlugosz
Автор

So....is this a bit akin to template based compile-time DI? I'm getting some definite DI vibes here.

ginkner
Автор

I am definitely against all EVIL Programmer.

kamalabuhenamostafa