> On Oct 18, 2017, at 8:04 PM, Xiaodi Wu via swift-evolution 
> <[email protected]> wrote:
> 
> I am not sure this is entirely wise, for a few reasons.
> 
> a) I sure don't know why you'd want to return `Void?`, but if you do, it 
> doesn't follow that it should be discardable simply because `Void` is 
> discardable. It may well be so, or it may be (for some odd reason) that it's 
> the return type of a pure function that certainly shouldn't be discardable.

FWIW, I’d be pretty opposed to making Void? implicitly discardable.  In the 
case of a generic function that returns T? where T can sometimes be void, the 
optional still carries information: perhaps about failure of the operation or 
something else.  The reason that void and Never default to being ignored is 
that they are carry no information.   Void? carries one important bit.

-Chris

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to