[swift-evolution] Why doesn't removeLast() on Collection return an optional?
Jean-Daniel
dev at xenonium.com
Tue Oct 18 15:28:15 CDT 2016
> Le 17 oct. 2016 à 23:20, Max Moiseev via swift-evolution <swift-evolution at swift.org> a écrit :
>
> Hi Louis,
>
> I believe, sometimes there are situations where you know for sure that your collection is not empty. Maybe you are already in the context where the check has been performed. In these cases there is no reason you’d have to pay the price of an emptiness check once again.
You have to pay the price anyway, as the check has to be performed to decide if the software should abort.
More information about the swift-evolution
mailing list