[swift-evolution] [Proposal] More lenient subscript methods over Collections
Luis Henrique B. Sousa
lshsousa at gmail.com
Thu May 12 10:53:59 CDT 2016
I agree with your parenthesis, but it might not be a valid argument if we
consider that "clamp" is already a word used in the standard library
(but I have to say that also as a non-native speaker "within" was way more
clear to me at first sight... 8-) )
On Thu, May 12, 2016 at 12:08 PM, Vladimir.S <svabox at gmail.com> wrote:
> If there is a method with such name in Range(with equal meaning) - then it
> seems like `clamping` will be the best solution here.
> (as non-native speaker I don't feel this word is often used especially in
> software development, but.. it seems like anyone who is writing in Swift
> must be strong native English speaker/writer :-P I also mean all these
> naming conversions, verb/noun, -ing/-ed/-able etc ;-) )
> On 12.05.2016 12:56, Luis Henrique B. Sousa wrote:
>> Yes, it would really be more consistent. "within" sounds great to me as
>> well, but I don't know if there is a naming convention for it.
>> I am okay to change our proposal to have those labels as two verbs -
>> instead of a preposition and a verb - as suggested by @Brent.
>> More opinions?
>> - Luis
>> On Thu, May 12, 2016 at 7:25 AM, Brent Royal-Gordon <
>> brent at architechies.com
>> <mailto:brent at architechies.com>> wrote:
>> > It sounds good, thanks for you suggestions @Vladimir, @Patrick and
>> > I've just updated the proposal:
>> > - Luis
>> Hmm. If you're going with `checking` for one of them, perhaps the
>> should be `clamping` (for the analogous method on `Range`, which you
>> might want to use in the implementation of that subscript). That would
>> create a nicely matched pair:
>> array[checking: 0..<10]
>> array[clamping: 0..<10]
>> Brent Royal-Gordon
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution