ATProto Browser

ATProto Browser

Experimental browser for the Atmosphere

Post

In Swift 5.7 and later, we can compare two values of type Any by casting them to any Equatable, thanks to the unlocked existential support: nilcoalescing.com/blog/CheckIf... #SwiftLang

Apr 18, 2025, 9:35 PM

Record data

{
  "uri": "at://did:plc:a6pco5evspx7fxkag3omjadp/app.bsky.feed.post/3ln4lauhc222u",
  "cid": "bafyreigz3nic6x5kzc7b22dtgridkkxlungglqhyta625blhszyd2tytcu",
  "value": {
    "text": "In Swift 5.7 and later, we can compare two values of type Any by casting them to any Equatable, thanks to the unlocked existential support:\nnilcoalescing.com/blog/CheckIf...\n#SwiftLang",
    "$type": "app.bsky.feed.post",
    "embed": {
      "$type": "app.bsky.embed.external",
      "external": {
        "uri": "https://nilcoalescing.com/blog/CheckIfTwoValuesOfTypeAnyAreEqual/",
        "thumb": {
          "$type": "blob",
          "ref": {
            "$link": "bafkreibn2u76q3dcewrhpkmkcjeei6gs2yok6d64wa2pn4rpkmfx6ogcoa"
          },
          "mimeType": "image/jpeg",
          "size": 295812
        },
        "title": "Check if two values of type Any are equal",
        "description": "In Swift 5.7 that comes with Xcode 14 we can check if two values of type Any are equal, because we can cast values to any Equatable and use any Equatable as a parameter type."
      }
    },
    "langs": [
      "en"
    ],
    "facets": [
      {
        "index": {
          "byteEnd": 173,
          "byteStart": 140
        },
        "features": [
          {
            "uri": "https://nilcoalescing.com/blog/CheckIfTwoValuesOfTypeAnyAreEqual/",
            "$type": "app.bsky.richtext.facet#link"
          }
        ]
      },
      {
        "index": {
          "byteEnd": 184,
          "byteStart": 174
        },
        "features": [
          {
            "tag": "SwiftLang",
            "$type": "app.bsky.richtext.facet#tag"
          }
        ]
      }
    ],
    "createdAt": "2025-04-18T21:35:55.393Z"
  }
}