[swift-evolution] [Proposal] Partial initializers

James Campbell james at supmenow.com
Thu Jan 28 02:57:41 CST 2016


I love macro systems but I think most of the pain comes from poor compiler support.

Even if we had some sort of template system  like c++ baked into swift for doing this boiler plate I think it would be great

Sent from my iPhone

> On 22 Jan 2016, at 06:01, Austin Zheng via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I feel like "macro system" is probably the right way to approach features whose purpose is to help developers not write boilerplate.
> 
> I know we have a philosophy that warns us to not allow the idea of macro system to become a crutch that precludes us designing features well. I think the opposite also applies - if there's something that's a good fit for a macro system, it probably makes sense to defer it rather than trying to add it in as language syntax and features that can't pay for themselves in terms of complexity.
> 
> Best,
> Austin
>  
> 
>> On Thu, Jan 21, 2016 at 9:48 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>>>> On Jan 21, 2016, at 9:20 PM, Slava Pestov <spestov at apple.com> wrote:
>>>> 
>>>> 
>>>> I’m not sold on the notion of partial initializers in the first place, but if we were to go down this path, the approach of nailing down the exact initialization behavior and requirements of the partial initializer - and making it part of its explicitly declared interface - is the right way to go.
>>> 
>>> Fair enough. I’m also worried about the prospect of adding even more complexity — and syntax — to Swift’s initializer model. My hope is that we can map this to existing language features somehow, or combine this with some other simplification of the initializer model so that the net complexity gain is not too high. But since I don’t have any concrete suggestions at this point, I’ll stay quiet for a while ;-)
>> 
>> Macro system? :-)
>> 
>> -Chris
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> 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/20160128/f0bf8243/attachment.html>


More information about the swift-evolution mailing list