[PATCH] Introduce a section to the programmers manual about type hierarchies, polymorphism, and virtual dispatch.
kristof.beyls at arm.com
Tue Jan 27 00:33:44 PST 2015
Comment at: docs/ProgrammersManual.rst:2540
@@ +2539,3 @@
+closed type hierarchies with manual tagged dispatch rather than the open
+inheritance model and virtual dispatch that is more common in C++ code. This is
+because LLVM rarely encourages library consumers to extend its core types, and
I'm not a C++ nor object oriented design expert, but could understand the explanation up to this point reasonably well.
I am not sure what is meant with "manual tagged dispatch". A web search gave me some
explanations - but no great ones. I'm wondering if it would be possible to also give a pointer
that explains "tag dispatching" and how it results in closed type hierarchies?
Or maybe one of the videos pointed to above explain it (sorry - haven't watched those yet)?
I think it's a good idea to record and explain best practice used in LLVM object-oriented/type hierarchy design.
More information about the llvm-commits