ATProto Browser

ATProto Browser

Experimental browser for the Atmosphere

Post

Swift footgun: Dictionary.updateValue(forKey:) and Dictionary.removeValue(forKey:) return the old value, which means if you have nested collections, this will frequently cause a COW. Use the subscripts accessors.

May 8, 2025, 1:49 PM

Record data

{
  "uri": "at://did:plc:rtcmfdskwc7kfc3bgnwbpqxq/app.bsky.feed.post/3loo2izhsvs2a",
  "cid": "bafyreiha2irgby3apggdsei5ylvoob5n5x5u6fnipgyun7xxlltvorkwrq",
  "value": {
    "text": "Swift footgun: Dictionary.updateValue(forKey:) and Dictionary.removeValue(forKey:) return the old value, which means if you have nested collections, this will frequently cause a COW. Use the subscripts accessors.",
    "$type": "app.bsky.feed.post",
    "langs": [
      "en"
    ],
    "createdAt": "2025-05-08T13:49:22.391Z"
  }
}