I like the idea of the of the bounded subscript, however the optional one I
feel could be used for clumsy code.
.first and .last have value, but once you start stepping several arbitrary
indices in, then that code is likely fragile?
I can think of ‘within’, ‘inside’ and ‘intersecting’ as
> lenient -> keep "lenient:" ? "requested:" ? "optional:"?
`checking:`, to indicate that the index will be checked before it's used?
--
Brent Royal-Gordon
Architechies
___
swift-evolution mailing list
swift-evolution@swift.org
Yes @Matthew, I did; my very first draft sought to change the default
subscript method. However, there were some opinions against overriding the
default *fail fast* behaviour as it could result in more bugs and in an
overload to debug. It wasn't set in stone, so I think it's something that
could
Did you consider making the safer, optional overload the "default" and just
omit the label?
Sent from my iPad
> On May 6, 2016, at 10:23 AM, Luis Henrique B. Sousa via swift-evolution
> wrote:
>
> "bounded" sounds good to me, but I don't know if "optional" is a
"bounded" sounds good to me, but I don't know if "optional" is a good
choice as it could be highlighted as a reserved keyword:
https://github.com/luish/swift-evolution/blob/more-lenient-subscripts/proposals/-more-lenient-collections-subscripts.md#detailed-design
- Luis
On Fri, Apr 29, 2016
From my point of view,
truncate -> bounded
lenient -> keep "lenient:" ? "requested:" ? "optional:"?
On 29.04.2016 17:46, Thorsten Seitz wrote:
Some alternatives to 'safe:'
existing:
bounded:
valid:
-Thorsten
Am 29.04.2016 um 00:20 schrieb Luis Henrique B. Sousa via swift-evolution
Some alternatives to 'safe:'
existing:
bounded:
valid:
-Thorsten
> Am 29.04.2016 um 00:20 schrieb Luis Henrique B. Sousa via swift-evolution
> :
>
> Thanks Vladimir, your considerations and suggestions are totally valid, I'm
> going to change the document
I support this proposal. Probably we all should select the best labels
(truncate/lenient or other). As not native English speaker, I don't feel
like 'lenient' is well-known word or often-used word in software
development. But all this just a details we need to discuss.
What I think could be
As we have discussed throughout this thread, the initial proposal was
modified to include alternative subscript methods instead of modifying the
default operator/subscript behaviour.
The first draft is here: