Thinking about a conference talk on non-virtual polymorphism. I did an article on Medium with the overload pattern so I have the material. But the definition of "polymorphism" is slippery. For example, is function overloading polymorphism? I don't think so but if polymorphism is type-based dispatch it kind of fits. 🤔 🤔
Any thoughts?
@rmerriam in my (C++) teaching function overloading and templates are static (compile-time) polymorphism
Based on the comments here and another private one, I'll accept that function overloading and similar techniques are polymorphism. That defines the term as "type-based dispatch", or, in more C++ terms, "type-based invocation". I can work with that. The main focus will be on the override pattern, CRTP, and other approaches I've yet to discern.
#cpp #CPlusCplus