> On 21 Mar 2016, at 23:21, Adrian Kashivskyy <[email protected]> wrote:
>
> I believe the scoped @discardableResult(warn|critical) attribute is a nice
> idea for future directions, but I'm not sure it's in scope of this proposal,
> which, as a first small step, aims to basically invert the
> @warn_unused_result standard.
>
> cc Erica
For the addition of critical sure, but the ability for developers to switch
between warn-by-default and ignore-by-default (current) behaviour would ease
migration, and address concerns from those that prefer the current behaviour;
i.e- for types designed with method chaining in mind the current default is
preferable to the new one, and the new default will actually cause those types
to become susceptible to the same mistakes that warn-by-default hopes to avoid.
For this reason I think that having an attribute at both function and type
levels is important, as it lets developers choose for themselves what the
default for their type is (or file, or extension, whatever scope makes most
sense).
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution