Bug 66983

Summary: Move file internal methods to a class continuation in WKView
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Anders Carlsson
Reported 2011-08-25 14:39:28 PDT
Move file internal methods to a class continuation in WKView
Attachments
Patch (2.59 KB, patch)
2011-08-25 14:39 PDT, Anders Carlsson
mitz: review+
Anders Carlsson
Comment 1 2011-08-25 14:39:54 PDT
mitz
Comment 2 2011-08-25 15:28:20 PDT
Comment on attachment 105248 [details] Patch r=me but while this is a neat way to do things in the future, changing existing code to use continuations has almost zero benefit and makes it harder to “svn annotate” source code, so perhaps we shouldn’t do it everywhere.
Anders Carlsson
Comment 3 2011-08-25 15:32:46 PDT
(In reply to comment #2) > (From update of attachment 105248 [details]) > r=me but while this is a neat way to do things in the future, changing existing code to use continuations has almost zero benefit and makes it harder to “svn annotate” source code, so perhaps we shouldn’t do it everywhere. I agree.
Anders Carlsson
Comment 4 2011-08-25 15:33:17 PDT
Darin Adler
Comment 5 2011-08-25 16:19:52 PDT
Do we still get an error or warning if we omit the method definitions?
Anders Carlsson
Comment 6 2011-08-25 16:34:37 PDT
(In reply to comment #5) > Do we still get an error or warning if we omit the method definitions? Yes.
Adam Roben (:aroben)
Comment 7 2011-08-26 08:25:24 PDT
What advantages over categories do class extensions provide?
Adam Roben (:aroben)
Comment 8 2011-08-26 08:25:56 PDT
I guess maybe it makes it easier to change a method from being internal to public and vice-versa. You won't have to move the method within the file when doing that.
Darin Adler
Comment 9 2011-08-26 10:03:03 PDT
The second, smaller advantage is that there’s no spurious “category name” that you have to chose.
Note You need to log in before you can comment on or make changes to this bug.