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

How to init properties ? #151

Open
onmyway133 opened this issue Dec 1, 2015 · 1 comment
Open

How to init properties ? #151

onmyway133 opened this issue Dec 1, 2015 · 1 comment

Comments

@onmyway133
Copy link
Contributor

I recently come across this Swift init that discusses the many ways of initializing properties. I often go with lazy var’s with side-effects for small size, and implicitly unwraped optional var! for more complex case

What do you think?

@kostiakoval
Copy link
Contributor

This is my approach:

  • avoid implicitly unwraped optional var! when possible.
  • Use init() and pass dependent object to it.

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