
OpenMethod could use reflection. At the very least, I could use it to find direct base classes more efficiently. Currently, I record transitive bases at compile time, and deduce the direct bases at runtime. This would not be a user-facing improvement though. But in theory class registration could be completely automated. It would require scanning the entire translation unit to find all the classes that are used as virtual parameters in all the methods, then a second time to find all their derived classes. I played a little with this last year (https://godbolt.org/z/hM5PEbG6d). I remember hitting compiler limits very quickly. I had to add -fbracket-depth=100000. Also this https://godbolt.org/z/1dxoz51T5 used to work but not anymore. The D version of the library uses similar techniques, and it does not require manual class registration. Beyond that, when we have code injection, I could use it to provide an alternative to the macros. J-L