UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Difficulty with closures

Forums > 100 Days of SwiftUI

Does anyone have any suggestions on how to better undestand closures for a complete beginner?

I have been going over Day 6 and Day 7 for three days now because I want to make sure I fully understand them before moving on. I undestand the general concept - a bit of code assinged to a variable that can then be used inside of other functions when needed - but I'm having a hard time following the "signal flow" of the syntax and feel like I am miles away from being able to write my own closures, even relatively simple ones. Any tips would be appreciated. Thanks.

3      

Hi! I don't think this is a right approach. Closures are complicated and take time to fully grasp. Using them and seeing them in context is key, so if I were you I would continue with the 100 Days and with time you get better understanding.

4      

I agree with @nemecek-filip. If you know what a closure look like everytime one is used in the course you will see it and then be able to understand what it is doing and then you be writing them without thinking. Good luck with the rest of the course, Paul does a great job at explaining thing as you go along.

3      

Thank you both for the insight. I was afraid not fully grasping something before moving on would snowball into a bunch of stuff I didn't know and I'd eventually get lost. I have tried learning other languages in the past and have gotten discouraged, but I'm determined this time! And Paul's layout and concise teaching style is great so I'm hoping to be successful this time!

3      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.