Hey everyone, I have been trying to learn swift using swift language book and even after reading and trying some code examples myself the topic of swift concurrency remains complete alien to me, i mean i have used it to download some data over internet in some simple ios apps while learning, but still what’s happening under the hood is 80% alien to me can someone tell me how they approached the topic and understood it, ( like really understood it rather than just using it ) it would be really helpful for me to learn and understand it please ?
[ some additional background about me ]
i am completely new to this concept of parallel programming, the idea seems simple and i have had chance to use it in other lang’s like kotlin previously but i had knowledge enough about using it but never ever did i understand how to use it correctly or even how it even works actually. Again iam not an experienced programmer or anyone who has decades of experience, i had just started to learn about programming some 1-2 years ago and specifically swift and ios dev just 3-4 months ago, so that’s it please read this info if it can help u tailor responses accordingly.
Swift concurrency is quite a broad topic, as it includes multiple areas:
Asynchronous functions
Structured concurrency
Isolation (centered around the actor model and region-based isolation)
Parallel computing
Reactive programming
Is there a specific part of Swift’s concurrency model you would like to understand better? Some of these areas don’t have great official documentation or are considered out of scope for it. Are you looking to better understand the underlying concepts or rather Swift-specific?
@NotTheNHK Thanks for replying
Actually i am looking to understand both the underlying concepts too and rather swift specific thing too as i want to learn how to use vapor for swift serverside and i tried to look at the code snippets and the swift concurency concepts are almost used everywhere there, so i tried to read it from swift book but there are not many examples there that could help make it crystal clear, can u tell me how did u understand them when u encountered for the first time?
It's actually quite common for people to feel like they must first understand everything before they can proceed. And while I am very sympathetic to this, I think it is rarely the most effective approach. My personal preference is to start very small and build slowly over time as specific practical needs come up. I very much agree with @NotTheNHK that there’s a lot here.
I'd love to hear more concrete examples of things you do not understand or find confusing.
Probably not the answer you expect, but, as usual, immersion, curiosity, and repetition are key. Furthermore, the quality of the material and awareness of your weak areas will also be significant factors.
On a personal note, I think video is, most of the time, rather counterproductive, as is material in general that doesn't take you seriously. Also, don’t hesitate to immerse yourself in material you don't fully understand. Remember: immersion, curiosity, and repetition.