Miguel de Icaza ᯅ🍉 on Nostr: I use this idiom extensively in Swift with Godot. I used to do one guard for each ...
I use this idiom extensively in Swift with Godot.
I used to do one guard for each condition, until I discovered I could compound those all in one go with the comma operator.
In this particular case, I am dealing with converting weakly typed data into strongly typed data:
https://mastodon.social/@Migueldeicaza/112900465963859780Published at
2024-08-04 15:54:27Event JSON
{
"id": "be1e6223f7d986ddd20b664ea5b8502f600c03275d058665a56f36636b9e74ad",
"pubkey": "878c47bd4979fad7d81d5032895a0cbd8c7b3ac35f6b75f6131bd7144293d9fa",
"created_at": 1722786867,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/Migueldeicaza/statuses/112904560165031862",
"activitypub"
]
],
"content": "I use this idiom extensively in Swift with Godot. \n\nI used to do one guard for each condition, until I discovered I could compound those all in one go with the comma operator.\n\nIn this particular case, I am dealing with converting weakly typed data into strongly typed data:\n\nhttps://mastodon.social/@Migueldeicaza/112900465963859780",
"sig": "fa56c6e595b84e851aa15b0b1526d9841b4c14e5c35a328189859f081df8a7013e0eea2e1aa775a02eb5529442c7beb3298ac01e58bde28b12dbb324fbcdad53"
}