[webkit-dev] Class-level comments in the source code
Per Bothner
per.bothner at oracle.com
Fri Jul 6 14:35:14 PDT 2012
On 07/06/2012 02:18 PM, Ryosuke Niwa wrote:
> I'd argue that we should still strive to make class names
> self-explanatory as much as possible, and use comments as the last resort.
Fair enough. However, it's hard to come up with reasonably short and
readable
names that are self-explanatory. Yes, a good name is very helpful, and
can suggest the usage, but mostly if you already have a lot of context.
> I've found that our culture of not adding comments have given me a
> pressure to think really hard to come up with better class names rather
> than going with vague names with explanatory comments. In some cases, it
> made me realize that the particular object relationships I had in my
> mind was not a good design and made me come up with a new design that
> involved easier-to-understand classes.
Pressure to come up with good names isn't incompatible with comments ...
--
--Per Bothner
per.bothner at oracle.com per at bothner.com http://per.bothner.com/
More information about the webkit-dev
mailing list