@holly @groue @calicoding @drewmccormack @cocoafrog @mattiem
Sometimes reinventing the hot water is not a good idea. The concept of the old Obj-C NSOperationQueue & Co. was many times simpler to understand and easier to use. Swift needs to push the brake, clean up the mess, and simplify! Otherwise it is heading to yet another C++…
@groue @tuparev @holly @calicoding @drewmccormack @cocoafrog Yes you’re right! I was actually talking about post-usable operations. I now strongly prefer thinking in terms of the things I need to protect, not the mechanisms I need to protect them.
Doesn’t make it easy to learn/migrate though.
@steve @helge @groue @tuparev @holly @calicoding @drewmccormack @cocoafrog I think the context was about a type that describes work you can run. I wouldn’t have thought of it, but I see it.
But I also think that the dominant use of OperationQueues is for concurrency.
@mattiem @steve @helge @groue @holly @calicoding @drewmccormack @cocoafrog
“But I also think that the dominant use of OperationQueues is for concurrency.”
YES!
@steve Taking out the other people to not further distract them, hope this works 🙂
Yes, I understand what an NSOperation can do (Shrugs is completely built around them, and doesn't always queue them!).
What I said is that the more important thing about them IMO is that it allows one to compose more complex functionality w/ a single entry point. This can be achieved by callAsFunction.
Think this (I understand that it _still_ isn't 100% the same):