[swift-evolution] Change subscripts to use colons
Erica Sadun
erica at ericasadun.com
Mon Jul 11 14:29:39 CDT 2016
On Jul 11, 2016, at 1:21 PM, James Froggatt via swift-evolution <swift-evolution at swift.org> wrote:
>
> Thanks for letting me know this has been tried before, I'm actually in the process of drafting the proposal now.
I'd hesitate to try to do something off-beat and "blend" them but it amuses me no end that the :-> operator looks so very happy.
subscript(_ position: Int) inout :-> Element { get { … } set { … } }
Nonetheless, I do want to point out that unlike properties, subscripts provide a mapping between a domain and a range so it feels more natural to me to use -> than :.
-- E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160711/a978a2f0/attachment.html>
More information about the swift-evolution
mailing list