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

Mike Kluev mike.kluev at gmail.com
Wed Nov 1 09:43:31 CDT 2017


On 1 November 2017 at 13:34, Wallacy <wallacyf at gmail.com> wrote:

> Partial (like in C#) is good enough.
>

"partial" will not read correctly in this context:

class ViewController: UIViewController {
    partial DataSource // ?!
    ...
}

partial DataSource of ViewController: UITableViewDataSource { // ?!
}

if you mean:

partial class ViewController: UITableViewDataSource {
    ...
}

this is not what i'm suggesting. parts/continuations must have a name and
this name must be listed in a ledger (of the main class or another part of
it) for the part to be able to exist at all.

having the "main" part (just the normal class definition) is good for:

- it is the only place to put base class in (like the above
UIViewController)

- it has the starting ledger that list parts (direct sub-parts). all parts
can be found "recursively" from that starting point.

with "parts" many pieces that are extensions today will become parts. and
"private" to "fileprivate" promotion feature will likely not be needed
anymore (we can of course leave it as is for compatibility).

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


More information about the swift-evolution mailing list