[swift-evolution] continuations - "extensions on steroids" idea

Mike Kluev mike.kluev at gmail.com
Fri Nov 3 12:55:50 CDT 2017


On 3 November 2017 at 17:23, Adam Kemp <adam_kemp at apple.com> wrote:

>
>
> When you actually try to use that technique in a fuller example it becomes
> impractical. I know because some people working on the same code base tried
> that, and it was much worse.
>

please provide more details on this. i was and still using such a
technique, so want to be prepared for those pitfalls before i actually
encounter them.


> I will concede that there are other techniques for cross-platform code
> that might be considered even cleaner. This isn’t the only technique, and I
> won’t claim that it’s the best technique, but it is a very useful technique
> that I have seen used very effectively. It would be nice to be able to have
> it as an option.
>
> having said that, yes, i can see your point. my fear is that it will be
> (1) too fragile (e.g. you have "TableViewDelegate" in the ledger and just
> forgot to include the relevant file in the target - the app compiles but
> then misbehaves,
>
>
> My argument is that there should be no ledger in the first place. IMO you
> haven’t made the case for that requirement.
>

> If you forget to implement a protocol then ...
>

i mean this:

class MyView: UIView {
    optional part Drawing
}

part Drawing of MyView { // **** forgot to include this into target
    override func drawRect(...) {
        .....
    }
}

the app compiles but doesn't work correctly.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171103/7ee8f95f/attachment.html>


More information about the swift-evolution mailing list