- 7 Posts
- 3 Comments
Joined 3 years ago
Cake day: June 11th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
mattie@lemmy.worldto
Swift@programming.dev•Are dictionaries on the stack or on the heap?English
1·2 years agoDictionary 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?
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


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.