Re: Swift and parameter names
Re: Swift and parameter names
- Subject: Re: Swift and parameter names
- From: Greg Parker <email@hidden>
- Date: Mon, 29 Jun 2015 15:50:32 -0700
> On Jun 29, 2015, at 3:42 PM, Rick Mann <email@hidden> wrote:
>
> Here's an example (and this is what I frequently encounter) where requiring parameter names adds nothing but clutter:
>
> let config = WKWebViewConfiguration()
> self.webView = WKWebView(frame: self.webViewContainer.frame, configuration: config);
>
> Moreover, when you're skimming the code, it looks a bit like the WKWebView constructor takes four arguments, not two. If you work the way I do, which is to skim pages of code for shapes (e.g., I know the constructor takes two parameters, so I can quickly zero in on a thing that looks like a call with a couple of parameters, delimited by white space, and then look more closely to see if it's the one I wanted. The extra islands of text from parameter names throws that off).
Perhaps you would prefer a different whitespace convention, one with no spaces around the colon in actual parameters. That's a popular convention in Objective-C. Otherwise there is no difference between Objective-C and Swift here.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden