[Swift-devel] Feature proposal: struct constructors

Justin M Wozniak wozniak at mcs.anl.gov
Wed Feb 4 11:39:21 CST 2015


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




More information about the Swift-devel mailing list