> On Jun 1, 2016, at 8:58 AM, L. Mihalkovic <[email protected]> 
> wrote:
> 
> 
> 
>> On Jun 1, 2016, at 2:38 PM, Vladimir.S via swift-evolution 
>> <[email protected]> wrote:
>> 
>>> On 01.06.2016 11:00, Austin Zheng wrote:
>>> Tuples are a structural type, they are described entirely by the fact
>>> that they are a tuple, plus their contained types.
>>> 
>>> Enum cases are not individual types; that precedent exists nowhere in
>>> Swift. You can't (yet) build a structural type out of something that
>>> isn't a type. The fact that you had to propose something like
>>> "AdhocEnumFitFill_2383748" as an autogenerated name for the type
>>> demonstrates the proposal's weaknesses:
> 
> Vehemently disagree! The problem is only to think that the name must be 
> random: It CAN ABSOLUTELY NOT be random in order to respect the semantic of a 
> nominal type. Once you accept that, then this is just a very simple and 
> clever syntax sugaring for enum declarations.

My point isn't that the name is random, it's that you need an autogenerated 
name to begin with, and that it shouldn't be compared to a tuple because (like 
you said) it's a nominal type (albeit one that you don't directly name).

That being said, I completely agree with you that this is just language sugar 
around some types that the compiler synthesizes for you. It's sugar I consider 
a largely useless addition to the language, but there is nothing technical 
stopping it from being implemented.

> 
> See my other response for more details
> 

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

Reply via email to