[swift-evolution] Proposal: Add Flags to Disable [Optional] Conversions
Developer
devteam.codafi at gmail.com
Wed Dec 9 17:01:47 CST 2015
OK, so Optional conversions need to be re-evaluated, but what about passing a flag disabling all implicit conversions entirely?
> On Dec 9, 2015, at 5:47 PM, Chris Lattner <clattner at apple.com> wrote:
>
>
>> On Dec 9, 2015, at 11:20 AM, Developer via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>> Hello all,
>>
>> Considering what I do with Swift, I recently posted a pull request that adds a flag to the frontend that would disable all implicit optional conversions by making them errors. From my perspective, implicit conversions are convenient, but they allow certain strange behaviors (https://github.com/typelift/Swiftz/blob/master/SwiftzTests/EitherSpec.swift#L72 <https://github.com/typelift/Swiftz/blob/master/SwiftzTests/EitherSpec.swift#L72>) to show up. For the community, the question is threefold:
>>
>> 1) Would anything break if this were applied?
>> 2) Would it be appropriate to expand the flag by allowing all implicit conversions to be disabled?
>> 3) If you remain unconvinced it should be an error, would implicit conversion warnings be more appropriate?
>
> Hi Robert,
>
> The rules for implicit conversions are optionals need to be re-evaluated, I expect this to happen for Swift 3 (after Swift 2.2 is out of the door). Once that is done, we can talk about a proposal like this.
>
> -Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151209/0f544543/attachment.html>
More information about the swift-evolution
mailing list