Constructing a string that represents a function’s signature in C++ is a common problem, often showing up when wrapping low-level C libraries with higher-level, heavily-templated C++ code. One way of getting a type name in C++ is as follows:
If you work in high-performance computing, you probably know the spack package manager. In spack, packages are defined as python classes, using what looks like a domain-specific language, as exemplified bellow.