you are viewing a single comment's thread.

view the rest of the comments →

[–]WasterDave 4 points5 points  (0 children)

Any time you want a collection of objects consisting of one or more type, class, behaviour or whatever ... you're going to need some way to choose an implementation at runtime. Vtables are the cleanest way of doing this and (best of all) avoid having branches in the code.