[swift-evolution] Warn about unused Optional.some(())

Tino Heth 2th at gmx.de
Tue Jan 31 04:25:48 CST 2017

> I think we should remove the special treatment so that code in the example above would generate a warning about `()?` being unused. Users can silence it manually by assigning the result to `_`. 

Imho Swift already uses warnings excessively, and giving Optional<Void> more significance than Void feels strange.

Shortly after the new error-handling was added, I felt irritated when I first used a trowing void-function and got a warning ("hu? That function has no result to ignore — why should I declare a variable to store void?").

I'm fine with the current situation and wouldn't undo it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170131/36e723b5/attachment.html>

More information about the swift-evolution mailing list