Swift作者は、相当旧来言語の例外が嫌いみたいだな。実質Goとほぼ変わらんと思う。

claude.ai/chat/2399…

えーー、Swiftの例外、実質もう例外じゃないようなもんじゃん。ほとんどローカルにしか作用できない(さもなくば、あちこちthrowsだらけになる)。ウェブフレームワークでよくあるような、ルーターの根っこで例外キャッチしてHTTPエラーに変換するような処理もしづらいのでは。

Unlike exception handling in many languages — including Objective-C — error handling in Swift doesn’t involve unwinding the call stack, a process that can be computationally expensive. As such, the performance characteristics of a throw statement are comparable to those of a return statement.

ほう?どういうこと?

自販機のこと英語でbending machineだといまのいままで誤解してた…なにを曲げるのか不思議だったけど、vending machineだった…vend(売る)。ああ…