[swift-evolution] continuations - "extensions on steroids" idea
Adam Kemp
adam.kemp at apple.com
Wed Nov 1 10:22:25 CDT 2017
I don’t see why “parts” would need to be named. That seems overly complex for little benefit.
> On Nov 1, 2017, at 7:43 AM, Mike Kluev via swift-evolution <swift-evolution at swift.org> wrote:
>
>> 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
>
> _______________________________________________
> 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/20171101/777a560e/attachment.html>
More information about the swift-evolution
mailing list