[swift-evolution] Remove Failable Initializers
davesweeris at mac.com
davesweeris at mac.com
Tue Mar 8 15:56:24 CST 2016
Or when you’re writing a bit of genericish code where the function in question doesn’t need to care if the init worked or not.
> On Mar 8, 2016, at 09:56, Ilya Belenkiy via swift-evolution <swift-evolution at swift.org> wrote:
>
> Failable initializers are great when you don't care what kind of error happened and can handle it locally and the same way for any error (for example by skipping an element).
>
> I'd be very sad to lose them.
> On Tue, Mar 8, 2016 at 10:26 AM Thorsten Seitz via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>
> > Am 08.03.2016 um 11:07 schrieb Haravikk via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>>:
> >
> > Just because someone opts to use error handling over a failable initialiser doesn’t mean they have to go overboard on the detail of their errors; it’s entirely possible to pick a reasonable middle-ground.
>
> And it is entitely possible to just use an optional. If you prefer to use error handling over failable initializers, fine, just do so, but don't force it on others who are perfectly happy with the option to use optionals, too.
>
> -Thorsten
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160308/3603aa05/attachment.html>
More information about the swift-evolution
mailing list