[Swift-devel] Feature proposal: struct constructors

Tim Armstrong tim.g.armstrong at gmail.com
Wed Feb 4 11:43:28 CST 2015


Not that I remember.

- Tim

On Wed, Feb 4, 2015 at 11:39 AM, Justin M Wozniak <wozniak at mcs.anl.gov>
wrote:

>
> Did we discuss optional or named parameters wrt constructors?
>
> type v {
>   int x = 0;
>   int y = 0;
> }
>
> e2 = v(y=1);
>
> On 02/04/2015 11:14 AM, Tim Armstrong wrote:
>
>> type foo {
>>   int x;
>>   int y;
>> }
>>
>> foo bar;
>> bar.x = 1;
>> bar.y = 2;
>>
>
>
> --
> Justin M Wozniak
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20150204/f31a2980/attachment.html>


More information about the Swift-devel mailing list