> The optional itself will stand for the boolean needed by the filtering 
> operation.

What I meant here is that "filterMap" can only click in a developer's mind if 
the the developer uses Optional as a Bool. When the closure returns nil, that 
nil stands for false in the filtering operation. When the closure returns a 
`some`, that some stands for true in the filtering operation.

Put in another way: to properly explain "filterMap" to someone who already 
knows "filter", then you have to explain that optionals are used as booleans.

Now if one has to answer the canonical question "Does this proposal fit well 
with the feel and direction of Swift?", then one has to admit that the 
confusion of Optional with Bool has been rejected a long time ago as not 
fitting well with the direction of Swift.

Gwendal

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to