[swift-evolution] [Draft] extend API for managing tail-allocated buffers

2017-03-16 Thread Alexey Komnin via swift-evolution
Hi there, I've written up a proposal and would love to hear your feedback on it! Best Regards, Alex Komnin P.S. Based on discussion in https://lists.swift.org/pip ermail/swif

Re: [swift-evolution] [Proposal] Add Array binary search to the standard library

2017-01-30 Thread Alexey Komnin via swift-evolution
Hello to everyone. Let me put my two cents. >> I didn’t want the SortedArray to conform to MutableCollection or >> even RandomAccessCollection as I felt it was not needed just to >> support binary search and prevent re-sorting. > > You are right not to support MutableCollection or > RangeReplacea

Re: [swift-evolution] Add ability to validate collection indices

2016-12-23 Thread Alexey Komnin via swift-evolution
ms wrote: >>>>> I don't personally agree with #3, FWIW >>>>> >>>>> >>>>> >>>>>> On Dec 19, 2016, at 3:01 AM, Alexey Komnin >>>>>> wrote: >>>>>> >>>>>> Ok. Thro

Re: [swift-evolution] Add ability to validate collection indices

2016-12-20 Thread Alexey Komnin via swift-evolution
gt; 4. mutating methods should return index of inserted/replaced element. >>>> >>>> Did I miss anything? >>>> >>>> - Alex Komnin >>>> >>>> On Mon, Dec 19, 2016 at 6:10 AM, Dave Abrahams via swift-evolution >>>> wrot

[swift-evolution] Add ability to validate collection indices

2016-12-16 Thread Alexey Komnin via swift-evolution
Hello everyone! Currently, indices of a collection might be invalidated due to call to any mutating method of the object. Assume, you have two indices - they point to the first and the last elements of an array - and you call removeLast() routine. The latter index would be invalidated during thi

[swift-evolution] Add wrappers for allocWithTailElems_{n} routines

2016-12-13 Thread Alexey Komnin via swift-evolution
Hi everyone! I really don't know whether you have discussed it before. So, here is the deal. Currently, Builtin routines like allocWithTailElems_{n} not available outside of stdlib. On the other hand, those routines are widely used in implementation of containers: Array, Set, Dictionary and other