> On Dec 29, 2015, at 5:32 PM, Dave Abrahams <dabrah...@apple.com> wrote: > > >> On Dec 29, 2015, at 8:37 AM, Matthew Johnson via swift-evolution >> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote: >> >> Motivation >> >> Delegation is a robust, composition oriented design technique that keeps >> interface and implementation inheritance separate. The primary drawback to >> this technique is that it requires a lot of manual boilerplate to forward >> implemenation to the implementing member. This proposal eliminates the need >> to write such boilerplate manually, thus making delegation-based designs >> much more convenient and attractive. >> >> This proposal may also serve as the foundation for a future enhancement >> allowing a very concise “newtype” declaration. >> >> > > > Thanks for proposing this, Matthew! > > The biggest thing missing here IMO (which has been missing from most of the > other proposals I’ve seen) are examples of real-world problems solved by this > proposal. I have no doubt some forwarding mechanism would be a huge benefit, > but without clear examples, how do I know that this proposal actually > addresses the need? One approach might be to show how the Lazy Collections > subsystem in the standard library can be rewritten more simply using this > mechanism. > > -Dave >
Thanks for the feedback Dave! I agree that the motivation section is a bit light and will work on filling it out with more detail, including specific examples of how it could be used to address specific problems.
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution