[swift-evolution] Request: Multiple Bool signatures
Rudolf Adamkovic
salutis at me.com
Mon Mar 28 14:38:18 CDT 2016
FYI, looking at my code, the most common use-case is:
func setSomething(something: Bool, animated: Bool)
R+
Sent from my iPhone
> On 25 Mar 2016, at 23:33, Erica Sadun via swift-evolution <swift-evolution at swift.org> wrote:
>
> I am looking for examples of method/function signatures that use multiple Boolean flags, e.g.
>
> func generateContact(withAddress: Bool, withEmail: Bool, withPhone: Bool) -> Customer // not my code
>
> If you have app code or library code around that you can check, I would greatly appreciate if you can share signatures with me or just generally comment on how often this pattern shows up in your daily life. I am specifically looking for: use of two or more separate Boolean parameters passed as flags.
>
> I would also welcome examples of option sets that replaced Boolean flags with a note as to whether that option set type is used elsewhere in your app.
>
> I am following up to an action item that Brent Royal-Gordon mentioned on-list a while back but I want real supporting motivating code evidence before I move forward with a draft proposal.
>
> Feel free to email me off-list. Thank you, -- Erica
>
> _______________________________________________
> 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/20160328/1917c893/attachment.html>
More information about the swift-evolution
mailing list