Renaud Lienhart on Nostr: Sneaky Swift behaviour that surprised me just now: in a `repeat { … } while ...
Sneaky Swift behaviour that surprised me just now: in a `repeat { … } while condition` loop, the “continue" keyword will jump execution to the end of the loop, i.e. the evaluation of “condition”, and not to the top of the scope.
Published at
2024-02-23 07:43:49Event JSON
{
"id": "f9fb5722e7f37a230963ad3a7c221510774f6c401f0fad6098b432f967abdf8e",
"pubkey": "6552b030630993816cdf6f739269ea133436428583489f64263394e2c307b260",
"created_at": 1708674229,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/layoutSubviews/statuses/111979674310307180",
"activitypub"
]
],
"content": "Sneaky Swift behaviour that surprised me just now: in a `repeat { … } while condition` loop, the “continue\" keyword will jump execution to the end of the loop, i.e. the evaluation of “condition”, and not to the top of the scope.",
"sig": "d4f9c8d5792166fe66f8d3276640a1612acfb577155e373a99ad8a1293e7c6b75888f22f7560690fc743b252716c86ae595800b7bffd92e986e3241ce8d5edd1"
}