Sorry, but I'm going to have to disagree with you on this one. On Fri, Jun 10, 2016 at 2:26 PM, Erica Sadun <er...@ericasadun.com> wrote:
> On Jun 10, 2016, at 3:22 PM, Austin Zheng via swift-evolution < > swift-evolution@swift.org> wrote: > > So, instead of: > > @available(*, unavailable, renamed:"someNewAPI()") > public func someOldAPI() -> Int { fatalError() } > > You can just have: > > @available(*, unavailable, renamed:"someNewAPI()") > public func someOldAPI() -> Int > > The intent is, in my opinion, clearer for the latter and it feels less > kludgy. > > > You ask, we answer. I'd much prefer spelling out { > fatalError("unavailable API") }. > It makes the code clearer to read, to maintain, > The member is marked as "unavailable" in the @available annotation. I don't see how adding a fatalError() in the body makes it any clearer or easier to read. > it produces debug and runtime errors. etc. > I'm not sure how you can even compile code that uses an API marked as "unavailable", given that using such an API causes the compiler to error. > I think > this is an example where concision is overrated. > > -- E > > >
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution