3 ms·
Swift has release-mode assertions, they're done with precondition().
by SamReidHughes 10y ago
Swift has release-mode assertions, they're done with precondition().
- dbaupp 10y agoYou are correct, but my point was implicitly that the default thing people reach for is assert, especially since the name precondition sounds like it is only ok to call at the start of a function.