[PATCH] Introduce a section to the programmers manual about type hierarchies, polymorphism, and virtual dispatch.

Sean Silva chisophugis at gmail.com
Tue Jan 27 04:23:39 PST 2015


Some minor wording suggestions.


================
Comment at: docs/ProgrammersManual.rst:2506
@@ +2505,3 @@
+An alternate implementation strategy for the second use case which should be
+preferred within LLVM is to that of generic programming. For example, a template
+over some type parameter ``T`` can be instantiated across any particular
----------------
echristo wrote:
> joker.eph wrote:
> > " is to that of ", is it correct English? This is not clear to me (I'm not an English-native speaker).
> Not in this context no. It should probably be "is that of". Though the sentence might read more clearly as: "An alternate, and preferred within LLVM, strategy for the second use case is that of generic programming."
"An alternative strategy (preferred within LLVM) for the second use case is generic programming". Commas can be used for a lot of things in English, and sometimes even native speakers have to backtrack to figure out what kind of use it is (in this case, they are delimiting a parenthetical, so just use parentheses).

================
Comment at: docs/ProgrammersManual.rst:2529-2530
@@ +2528,4 @@
+
+When deciding between creating a type hierarchy and using virtual dispatch and
+using templates or concepts-based polymorphism, consider whether there is some
+refinement of an abstract base class which is actually a useful type on an
----------------
The different "and"'s here are sort of confusing. Maybe "creating a type hierarchy with virtual dispatch" to avoid one of them?

http://reviews.llvm.org/D7191

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list