[swift-evolution] [Review] SE-0109: Remove the Boolean protocol

Matthew Johnson matthew at anandabits.com
Wed Jun 29 08:47:26 CDT 2016



Sent from my iPad

> On Jun 29, 2016, at 7:52 AM, David Sweeris via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Aside from confusing people, does it actually hurt anything? It's not too hard to imagine that someone might make a type conform to `Boolean` because, within their code, the semantics of "x || yā€¯ are clear and that reads better than "x.foo || y.foo".
> 
> I agree it feels out of place, though. What about renaming it to something like "CustomBooleanConvertibleā€¯?

IIRC Optional conformed to this protocol early on and that conformance was removed.  In practice the idea of a protocol for "truthiness" to which non-Boolean types conform caused more confusion than it provided value.  It was a cool idea that just didn't work out so well.

IMO if it doesn't make sense for Optional to conform it is pretty unlikely it would make sense for other types to conform.  It seems like a good idea to remove the protocol.

> 
> - Dave Sweeris
> 
> 
>> On Jun 29, 2016, at 01:44, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> Hello Swift community,
>> 
>> The review of SE-0109 "Remove the Boolean protocol" begins now and runs through July 4, 2016. The proposal is available here:
>> 
>> https://github.com/apple/swift-evolution/blob/master/proposals/0109-remove-boolean.md
>> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
>> 
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:
>> 
>> Proposal link:
>> 
>> https://github.com/apple/swift-evolution/blob/master/proposals/0109-remove-boolean.md
>> Reply text
>> 
>> Other replies
>> What goes into a review?
>> 
>> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
>> 
>> What is your evaluation of the proposal?
>> Is the problem being addressed significant enough to warrant a change to Swift?
>> Does this proposal fit well with the feel and direction of Swift?
>> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
>> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>> More information about the Swift evolution process is available at
>> 
>> https://github.com/apple/swift-evolution/blob/master/process.md
>> Thank you,
>> 
>> -Doug
>> 
>> Review Manager
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160629/f9177f13/attachment.html>


More information about the swift-evolution mailing list