[swift-evolution] [Proposal] More lenient half-open range operator (was: [Proposal] Safer half-open range operator)
dabrahams at apple.com
Wed Apr 27 15:26:14 CDT 2016
on Wed Apr 27 2016, "Luis Henrique B. Sousa via swift-evolution" <swift-evolution at swift.org> wrote:
> Actually I had already modified the initial proposal to introduce those new
> subscripts methods.
> It is here now: (any help to improve that is very welcome)
> As the motivation and *problem* addressed remain the same, should I really
> create a new thread?
I dunno, but IMO you should change the title of this thread and the
proposal and the keywords therein. It's not about making indexing
safer, at least not in the sense we use the term “safety” around Swift.
Array indexing is currently perfectly memory- and type-safe in the
absence of race conditions. You're talking about making it more lenient
with respect to bounds checks.
> Best regards,
> - Luis
> On Wed, Apr 27, 2016 at 12:17 PM, Maximilian Hünenberger
> <m.huenenberger at me.com> wrote:
> Do you change the proposal to introduce new (default) subscripts to
> CollectionType/ RangeReplacableCollectionType?
> subscript(safe index: Index) -> Element?
> subscript(truncate range: Range<Index>) -> SubSequence
> Maybe a new proposal would be appropriate (and a new thread).
> Best regards
> - Maximilian
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution