[swift-evolution] Ad hoc enums / options
pgwsmith at gmail.com
Thu Jun 2 00:13:26 CDT 2016
Yes, great point! I think this is a sign it’s better to just have one way with an enum, so there’s no deciding on which method to use, or reluctance to switch away from ad hoc enums because they felt nicer initially. And enums aren’t that much to write.
With the addition of a macro system in future Swift you could probably create your own ad hoc enums, and that would be perfect for something like a playground.
> On 2 Jun 2016, at 2:57 PM, Thorsten Seitz via swift-evolution <swift-evolution at swift.org> wrote:
> Thinking of your example: where might the value for .fit or .fill come from? In most cases it won't be hardcoded in the call, but be either the result of a user setting or an algorithm. Both would need to be able to assign this value.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution