[swift-evolution] Strings in Swift 4

Jaden Geller jgeller at caltech.edu
Fri Jan 20 17:29:57 CST 2017

> On Jan 20, 2017, at 2:57 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>> The “Empty Subscript”
>> Empty subscript seems weird. IMO, it’s because of the asymmetry
>> between subscripts and computed properties. I would favour a model
>> which unifies computed properties and subscripts (e.g. computed
>> properties could return “addressors” for in-place mutation).
>> Maybe this could be an “entireCollection”/“entireSlice" computed
>> property?
> It could, but x.entireSlice is syntactically heavyweight compared to
> x[], and x[] lives on a continuum with x[a...], x[..<b], and x[a..<b]

Wouldn’t `x[…]` be more consistent with these other syntaxes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170120/2f06032f/attachment.html>

More information about the swift-evolution mailing list