> On Dec 29, 2015, at 8:37 AM, Matthew Johnson via swift-evolution 
> <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

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to