[swift-evolution] Fw: Re: [Proposal Draft] Literal Syntax Protocols

L. Mihalkovic laurent.mihalkovic at gmail.com
Fri Jun 24 10:50:24 CDT 2016


I find these 'stay-off-my-property' _ rather sub-par in a modern language (everything was different for c 40years ago). I find it rather sad to think that we r about to commit to using that pattern for another 30 years. If the demark between stdlib and compiler was cleaned up, it would even open the door to a clean way to make some embedded stdlib versions in the future
Regards
LM
(From mobile)

> On Jun 24, 2016, at 5:22 PM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I’m aware of that fact, but all types with underscore even in the stdlib telling me to keep my hands of them, because something might happen to them.
> 
> As an example we have _Strideable protocol which is visible by its name, but its declaration isn’t visible at all:
> 
> // FIXME(ABI)(compiler limitation): Remove `_Strideable`.
> // WORKAROUND rdar://25214598 - should be:
> // protocol Strideable : Comparable {...}
> 
> % for Self in ['_Strideable', 'Strideable']:
> From Stride.swift.gyb
> 
> 
> 
> -- 
> Adrian Zubarev
> Sent with Airmail
> 
> Am 24. Juni 2016 um 17:09:53, Matthew Johnson (matthew at anandabits.com) schrieb:
> 
>> The underscore is used in the same way it is used elsewhere in the standard library.  The protocols must be public because they need to be visible to user code in order for the design to work correctly.  However, they are considered implementation details that users really shouldn’t know about.  This pattern is well established in the standard library.
> 
> _______________________________________________
> 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/20160624/c4411a44/attachment.html>


More information about the swift-evolution mailing list