[PATCH] D18172: [CUDA][OpenMP] Add a generic offload action builder
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 30 16:34:26 PDT 2016
jlebar added a comment.
Alexey, it seems that you're asking for "final" on all classes that are not inherited from. Forgive my ignorance, but would you mind pointing me to the document that talks about our position on "final" in LLVM source? I don't see it in the style guide, but I may be missing something.
The style guide does talk a good bit about writing concise and generally not-misleading code. My concern is that adding "final" everywhere paints an inaccurate picture and will mislead readers. Specifically, "final" is useful as a signal to readers that a class cannot safely be inherited from. "Don't even think about it, buster." But here we're adding "final" to a lot of classes that, as far as I can tell, aren't distinctive except in that they have no subclasses today. The problem with this is that, if we use "final" in this way, it dilutes the first "don't even try" meaning. Now when I see a class with "final" that I want to subclass, I'm just going to rip the "final" off, because chances are, I can do so safely. Now "final" does not serve as a warning to me that I shouldn't do this.
Sorry to focus on a superficial issue, but I think this really does matter for usability.
http://reviews.llvm.org/D18172
More information about the cfe-commits
mailing list