Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default arguments naming #12

Closed
kostiakoval opened this issue Sep 8, 2015 · 2 comments
Closed

Use default arguments naming #12

kostiakoval opened this issue Sep 8, 2015 · 2 comments

Comments

@kostiakoval
Copy link

When I call a NSTimer.after and pass a function, it doesn't have a argument name for second argument. This feels not natural for me regarding that all other functions usually used default or external names.

  NSTimer.after(1.second, close)

Using default names don't change the nice trailing closure syntax

public class func after(interval: NSTimeInterval, block: () -> Void) -> NSTimer 
...
NSTimer.after(1.second) {
  print("done")
}

If you agree I can make a PR :)

@radex
Copy link
Owner

radex commented Sep 8, 2015

Thanks, but I think that's unnecessary. It reads quite naturally as the passed methods are going to be named with verbs generally. No need for verbosity.

@radex radex closed this as completed Sep 8, 2015
@kostiakoval
Copy link
Author

Actually it does! your are right! What I was thinking hmmm .... :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants