So here is something I just discovered I can do in C++ that I didn't know about.
templateCompile time polymorphism, but of completely unrelated types and no use of virtual methods.
My scripting language has both String and List types which are completely unrelated, but have a lot of overlap in terms of the operations the VM needs to do on them.
StringEntity and ListEntity do happen to both inherit a base class, but that is irrelevant for the subject here - could add a specialisation for any other class here.
This approach should mean I can define a common interface without affecting any of the other Entity classes, and use template functions to do the processing.
Call today's entry a snippet since I'm actually at work :)