mattie

joined 2 years ago
 

I've just noticed that the official Swift language guide has been updated. It now includes a number of additional topics on concurrency. There's still a long way to go here, but this is good progress!

I think the migration guide is still useful, and goes into a lot more depth in many areas. But, I'm very glad to see this is being filled in.

(However, I'm not glad to see "split isolation" used in an example: a type with different isolation than its members. The language supports this, sure, and it does have uses, but is a mistake 99% of the time.)

[–] mattie@lemmy.world 2 points 4 months ago

I think many people do have issues here though. And a lot stem from using concurrency without the compiler feedback enabled. This is one of the greatest things about this feature: it fixes a surprising amount of code that is wrong today.

 

There's quite a lot of background required to even begin to understand this feature completely. However, the documentation here is to-the-point and definitely useful. I like this quite a lot because it also shows how to use the migration feature, which is cool and pretty much essential if you want to adopt this in an existing project.

Could also be quite eye-opening if you have been using concurrency with the compiler feedback disabled.

(This whole per-diagnostic/feature documentation effort is just great too.)

 

Wrote this up in kind of hurry, but people seem to like it. Thought I’d throw it up over here.

[–] mattie@lemmy.world 1 points 1 year ago

Dictionary is a value type so it is stack-allocated. But that value is a pretty thin wrapper around a heap-allocated backing store. I’m not sure how useful it is to think about or even know that detail. I hate doing the cliché thing here, but can I ask why you are asking?

[–] mattie@lemmy.world 3 points 2 years ago

If anyone has any feedback on the content, I'd love to hear! You can also check out the sources and even get involved here: https://github.com/apple/swift-migration-guide

 

Hey all! I've been writing up a series on the changes coming to Swift 6 related to concurrency. Thought I'd start sharing them here too.