Avatar
omochimetaru 1/2/2025 3:43 PM
Happy New Year, Swift Evolution! This is a new pitch for a rule that would allow multi-statement if and switch expressions, as well as introduce do expressions. It does this via a new rule that the last expression in a function or branch is the return value, without a keyword (either return for functions/closures, or the previously pitched then...
👀 3
3:44 PM
複数文のif式のピッチが出たぞ
3:45 PM
then文は取り下げられて、rubyみたいな「最後の式」を値とみなすルールになってる
3:46 PM
then文をやめた理由も書いてあったけどよくわからなかったので後で読み直す
3:51 PM
合わせてdo式が来て、即時実行クロージャも不要になる
👍 1
❤️ 1