3 ms·
async/await are not primitives. Mutexes, semaphores, atomic counts etc... those are true primitives in multithreading and they have been around forever (since
by ardit33 6y ago
async/await are not primitives. Mutexes, semaphores, atomic counts etc... those are true primitives in multithreading and they have been around forever (since the 70s at least).
I feel the Swift lang. design is like amateur hour at its best, trying to reinvent the wheel, but still end up where it started, but at worse overrall usability. Just re-arranging chairs. 8 years later, and still Objective-c + GCD combo is better at multithreading.
In comparison: Java had decent multithreading support since version 1.1,(one year later after its release) and it had NIO by JDK 1.4 and full modern multithreading by JDK 1.5.
Swift is a couple of years behind because it is trying too hard to be cool and different.
- rubiquity 6y ago> async/await are not primitives. Mutexes, semaphores, atomic counts etc... those are true primitives in multithreading async/await, a way to model concurrency, and mutexes/semaphore/etc, a way to safely share data, belong to separate categories and one does not preclude the usage of the other, especially if your coroutines are allowed to run on different threads.
- asimpletune 6y agoI don’t think they meant one precludes the other, and “modeling concurrency” definitely is a “sharing data” problem. In other words, you would have to build a nicer concurrency abstraction out of a lower level primitive at some point.
- machello13 6y ago> worse overrall usability You can definitely find iOS/macOS developers who prefer objective-c, but they're in the minority. The vast majority would say that Swift is way, way more usable than Objective-C. Obj-C still has some advantages (dynamism being a big one) but for most tasks Swift makes developing both easier and more safe.
- kitsunesoba 6y agoComing from several years of writing Obj-C, Swift has certainly been a net benefit for me. Writing it well does require a bit of a shift in one's way of thinking (writing "Obj-C in Swift" is a recipe for pain) but I find that once that hurdle is cleared it's a very productive language to work with.
- nielsbot 6y agoWish they'd fix the "associated type issue" and the "a protocol isn't a type issue" tho... A little of Obj-C's dynamism would go a long way there.