[swift-evolution] [Pitch] Introduce continue to switch statements
Taras Zakharko
taras.zakharko at uzh.ch
Tue Jul 12 11:25:16 CDT 2016
There is some truth in every joke ;) I do like goto though. It makes my C code cleaner and easier to maintain. But given that Swift already has a very reasonable restricted goto mechanism with labels, I am as happy as it gets :)
— T
> On 12 Jul 2016, at 18:21, Douglas Gregor <dgregor at apple.com> wrote:
>
>
>> On Jul 12, 2016, at 9:20 AM, Taras Zakharko <taras.zakharko at uzh.ch> wrote:
>>
>> I’d love to see goto in Swift, but on the other hand, do {} with labels have so far been sufficient for any practical problem I encountered so far. Goto is much more useful in languages like C, which lack nested functions and other abstraction mechanisms.
>>
>> Of course, I wouldn’t try to write a high-performance interpreter in Swift any time soon.
>
> *Sigh*.
>
> Erica was making a joke. There shall be no ‘goto’ in Swift.
>
> - Doug
>
>>
>> — T
>>
>>> On 12 Jul 2016, at 18:07, Leonardo Pessoa via swift-evolution <swift-evolution at swift.org> wrote:
>>>
>>> I'd agree with Doug, completely out of scope. The only way I'd support
>>> a goto statement was to jump to another switch case as in C#.
>>>
>>> L
>>>
>>>
>>> On 12 July 2016 at 12:49, Douglas Gregor via swift-evolution
>>> <swift-evolution at swift.org> wrote:
>>>>
>>>> On Jul 12, 2016, at 8:47 AM, Erica Sadun via swift-evolution
>>>> <swift-evolution at swift.org> wrote:
>>>>
>>>>
>>>> On Jul 11, 2016, at 4:49 PM, Chris Lattner <clattner at apple.com> wrote:
>>>>
>>>> As for all of the other additive changes, I would strongly prefer you to
>>>> *wait* on even proposing or discussing these things until after the Swift
>>>> 3.0 evolution cycle is done. Not only is it distracting for the community,
>>>> but the core team and many others won’t be be able to even read the thread
>>>> or the responses, thus your discussion cycle will be lacking key input.
>>>>
>>>> On this topic, we specifically discussed this when labeled breaks were being
>>>> designed, and when they were expanded to “do” in Swift 2. We specifically
>>>> decided to allow break but not continue, because we didn’t want these
>>>> control flow statements to be “another way to spell a loop”.
>>>>
>>>> -Chris
>>>>
>>>>
>>>> So I can take it as a given that this is out of scope for Swift 3 too?
>>>>
>>>> https://gist.github.com/erica/a78045d09fa5bb20e6e566295140c84d
>>>>
>>>>
>>>> No, *that* is out of scope for *Swift*.
>>>>
>>>> - Doug
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>
More information about the swift-evolution
mailing list