On 12 October 2017 at 09:34, David James <davidbjam...@gmail.com> wrote:
> IMO everyday app building would rarely need to use functions with > discardable results. This is more an issue with libraries or frameworks > that support a *fluent interface* (e.g. that return self) where an > operator chain can be stopped at any point, unless it clearly doesn’t make > sense, in which case @discardableResult would not be advised. I am building > such a library. It has 200+ uses of @discardableResult and *I don’t have > a problem with it in it’s current form* (especially since it can go on > the line before the function). It’s an annotation for a specialized > purpose, hence the very specific nomenclature. > let me guess: you put it on a different line exactly because it is in it's current ugly form :) personally, if "x: inout Int" is in it's current form (vs. "@inputOutput x: Int") so shall be "discardable Int", i see no principle difference between them to make one looking it is from a different planet altogether. Mike
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution