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

Swift API Guidelines #3

Open
harlanhaskins opened this issue Aug 1, 2018 · 1 comment
Open

Swift API Guidelines #3

harlanhaskins opened this issue Aug 1, 2018 · 1 comment

Comments

@harlanhaskins
Copy link

Small nitpick here, the Swift API Guidelines state that getters should not begin with get, as it's implicit in the fact that the method returns something.

Maybe change things like:

func getMethods() -> [Selector] { ... }
func getImplementation(selector: Selector) -> IMP? 

to

var methods: [Selector] { ... }
func implementation(for selector: Selector) -> IMP?
@sushinoya
Copy link
Owner

@harlanhaskins Thank you so much for the issue! My rationale being having get in the getter names was that the original Objective-C Runtime methods such as class_getName, class_getProperty, objc_getClassList etc. all have get too. I was trying to follow the name structure of these runtime methods.

However, I agree that removing the get gives a slightly cleaner API and so I will change to that in the next release. Do let me know if you have any other suggestions or complaints about Lumos. Thank you :)

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