Re:The cost of dynamic vs. static dispatch in C++
by jamesaguilar on Thursday December 05, 2013 @11:44AM
(#6855325)
Unit testing is my #1 use for virtual functions. "somebody else's code" a.k.a. standard ML modules is a distant second.
Virtual dispatch is useful for type erasure, when using abstract types from plugins, DLLs or generally "somebody elses code". IMHO, the valid use cases within a standalone program are actually fairly small.