[swift-evolution] [Review] SE-0081: Move where clause to end of declaration
David Hart
david at hartbit.com
Wed May 11 16:23:08 CDT 2016
I’d find this very confusing because it would make declarations look the the declarations of the generic types comes after their uses.
> On 11 May 2016, at 22:56, Hooman Mehr via swift-evolution <swift-evolution at swift.org> wrote:
>
> How about a more radical change that eliminates this entire concern and keeps the whole generics declarations in one place:
>
> Move the entire generic declaration with its brackets somewhere other than between function name and its parameters.
>
> I know this breaks the “norm”, but what do you think?
>
>> On May 11, 2016, at 10:23 AM, Joe Groff via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>>>
>>> On May 11, 2016, at 6:54 AM, Thorsten Seitz <tseitz42 at icloud.com <mailto:tseitz42 at icloud.com>> wrote:
>>>
>>>>
>>>> Am 11.05.2016 um 03:56 schrieb Joe Groff via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>>:
>>>>
>>>>
>>>>>> On May 10, 2016, at 4:19 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>>>>
>>>>>>
>>>>>> On May 10, 2016, at 3:46 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>>>>
>>>>>> I think actual keyword “where” provides enough of a delimiter that it won’t be hard to put something before it, and it seems unlikely to me that we would want to add anything after it without some other delimiter. So I’m not too concerned.
>>>>>
>>>>> Yeah, that’s my feeling as well.
>>>>
>>>> One conceivable use of `where` that this would shut the door on: infix `where` for generalized existentials, e.g. `Protocol where AssociatedType == Int` could be the Protocol existential with Self.AssociatedType constrained to Int.
>>>
>>> Why do you think that?
>>
>> This proposal moves `where` after the return type, which would be ambiguous with any infix use of `where` in the type grammar.
>>
>> -Joe
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160511/3b5da648/attachment.html>
More information about the swift-evolution
mailing list