> On 30 Nov 2016, at 14:11, Steve Prescott via swift-evolution 
> <[email protected]> wrote:
> 
> As the original poster of this thread, I wanted to re-state the original 
> question:
> 
> Should enums REQUIRE parameter names?
> 
> Pro:          The syntax would more closely match that for functions, which 
> requires names for all parameters (unless you say “_”) vs. the current syntax 
> that is sort of C-like.
> Con:  More verbose
> 
> With this suggestion, your declaration of a variable that uses an enum would 
> resemble calling a function.  e.g.:
> 
> var myTeam = Team.football (name: “Redskins”, city: “Washington, DC”, 
> quarterback: “Kirk Cousins”)
> 

I don’t think they should be required. The payload is actually a tuple, and 
element names are not required for tuples (and not even supported for 
single-element tuples). 

Your example is still possible without requiring labels; all that would change 
is that code which works today would suddenly break. Unless I’m mistaken, your 
proposal is about removing functionality and does not add anything.

- Karl
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to