OT: Swift is now open source

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 4 11:54:55 PST 2015


On 2015-12-04 13:35, rcorre wrote:

> Do you mean something like:
>
> enum Foo { bar, baz }
> void fun(Foo foo) { }
>
> fun(baz);
>
> I don't really mind having to use switch/with but I've found myself
> wishing for the above on occasion.

Yes, but in Swift you need to prefix "baz" with a dot.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list