[swift-users] Parameter Validation
Jens Alfke
jens at mooseyard.com
Mon Dec 7 13:03:57 CST 2015
> On Dec 7, 2015, at 10:56 AM, Jan Neumüller via swift-users <swift-users at swift.org> wrote:
>
> But what overhead? As you know Swift has *NO* exceptions. It’s just syntax sugar for normale error values.
Mostly the overhead in the caller of having to pass a (hidden) error parameter into the call, and check the return value and branch afterwards.
(C++/Obj-C exceptions actually have no runtime cost in the normal success case; it’s only throwing an exception that’s expensive.)
—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151207/27e4e656/attachment.html>
More information about the swift-users
mailing list