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

Singletons Update #9

Closed
wants to merge 1 commit into from
Closed

Conversation

Abstract45
Copy link

Added private initializer method for singleton and an alternative method for creating a singleton. Previously you could initialize the class using its default initializer i.e. let x = MyClass() and use its methods.

@timvermeulen
Copy link
Collaborator

I much prefer the alternative way that you provided over the original way. It just seems pointless to make a private variable if you don't need to. @iwasrobbed, what do you think?

@iwasrobbed
Copy link
Owner

@MiWand @timvermeulen Indeed, the updated way is preferred with static let these days, so I'd rather just remove the old way entirely.

Also @MiWand can you please make sure to indent the code examples to keep them looking clean ✨

@Abstract45
Copy link
Author

Ok will do in the future 👍

@iwasrobbed
Copy link
Owner

Rolled into ac7293a

@iwasrobbed iwasrobbed closed this Sep 20, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants