What I mean't is it would be great is if it was a native swift error :) so we could use try? syntax.
On Wed, Jan 6, 2016 at 6:32 PM, Max Moiseev <[email protected]> wrote: > Hi James, > > I believe this code > <https://github.com/apple/swift/blob/master/stdlib/public/core/RangeReplaceableCollectionType.swift#L235> > already > handles empty array scenario by failing if the precondition is not met. > Or do you have something else in mind? > > max > > On Jan 6, 2016, at 9:36 AM, James Campbell via swift-evolution < > [email protected]> wrote: > > If you call removeFirst and the array is empty it would be great if it was > optional so it could return nil or at least it threw an error so you could > handle that case. > > -- > Wizard > [email protected] > +44 7523 279 698 > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution > > > -- Wizard [email protected] +44 7523 279 698
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
