[swift-evolution] Add an ifPresent function to Optional

Erica Sadun erica at ericasadun.com
Mon Mar 14 17:37:26 CDT 2016


On Mar 14, 2016, at 4:33 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
> On Mon, Mar 14, 2016 at 1:28 PM, Erica Sadun via swift-evolution
> <swift-evolution at swift.org> wrote:
>> 
>>> On Mar 14, 2016, at 2:18 PM, Daniel Vollmer via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> Hi,
>>> 
>>>> On 13 Mar 2016, at 18:04, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>>>> 
>>>> I am in favour of making optionals consistently act like 1-item-max collections.
>>> 
>>> Why stop there? Why not make all non-optionals collections of one?
>> 
>> I don't quite see what advantage would that have. Could you elaborate?
> 
> I think that's exactly Daniel's point, that it would be absurd to do so.
> 
> Dmitri

Would you support removing map and flapMap from optionals then?

-- E



More information about the swift-evolution mailing list