[swift-users] Parameter Validation
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.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users