[Webkit-unassigned] [Bug 200006] style checker should suggest that single-argument constructors be explicit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 22 12:35:11 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=200006

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com

--- Comment #1 from Darin Adler <darin at apple.com> ---
Many constructors that can take a single argument should be explicit. But some should not be.

This is something that requires thought so I’m not sure the style checker should check it, unless we have a guideline that says "ignore the style checker when you intentionally are creating a type conversion". There isn’t a "style suggestion checker", but for something like this there would need to be.

One alternative to consider would be to come up with some comment syntax meaning "I mean to use this constructor for type conversion". Then I think it would be fine for the style checker to warn when there's neither "explicit" nor the comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190722/687a13e3/attachment.html>


More information about the webkit-unassigned mailing list