We solve the multiple dispatch problem for a components-for-cases encoding of algebraic datatypes in C++. For the multi-method, the programmer is required to specify the decentralised match statements using overloads of template functions. Then, they employ a one-liner preprocessor macro, which expands to the real dispatcher. The expanded one-liner performs iterative pointer introspection to accomplish late-binding using overload resolution. Even though we present our solution for ADTs, one can use the same technology for other types too.
|Publication status||Published - 4 Nov 2018|
|Event||ACM SIGPLAN Conference on Systems, Programming, Languages and Applications: Software for Humanity - Boston Park Plaza Hotel, Boston, United States|
Duration: 4 Nov 2018 → 9 Nov 2018
|Conference||ACM SIGPLAN Conference on Systems, Programming, Languages and Applications|
|Abbreviated title||SPLASH 2018|
|Period||4/11/18 → 9/11/18|
- Functional Programming