Re: [swift-evolution] [Pitch] deprecating ManagedBufferPointer

2016-10-19 Thread Erik Eckstein via swift-evolution
imumCapacity: Int, initWith factory: (StorageClass) throws -> () ) rethrows { buffer = Builtin.allocWithTailElems_1( StorageClass.self, minimumCapacity._builtinWordValue, Element.self) try factory(buffer) } // ... let buffer: StorageClass } > > >> On Oct

Re: [swift-evolution] [Pitch] deprecating ManagedBufferPointer

2016-10-13 Thread Erik Eckstein via swift-evolution
ved from, e.g., NSString or NSArray. That is, > however, an extremely stdlib-specifc need. > > >>> On 2016-10-11, at 00:12, Erik Eckstein via swift-evolution >> <swift-evolution@swift.org> wrote: >>> >>> The purpose of ManagedBufferPointer is to create a buffer w

[swift-evolution] [Pitch] deprecating ManagedBufferPointer

2016-10-10 Thread Erik Eckstein via swift-evolution
The purpose of ManagedBufferPointer is to create a buffer with a custom class-metadata to be able to implement a custom deinit (e.g. to destroy the tail allocated elements). It was used in Array (before I replaced it with the new tail-allocated-array-built-ins). But now it’s not used anymore in

Re: [swift-evolution] [Pitch] Eliminate `ManagedProtoBuffer`

2016-07-19 Thread Erik Eckstein via swift-evolution
> This is now part of a pull - https://github.com/apple/swift-evolution/pull/437 > > The discussion for the four items in the pull ran here > (http://thread.gmane.org/gmane.comp.lang.swift.evolution/23093), though there > was not enough feedback. But given the deadline for breaking changes, I

[swift-evolution] [Pitch] Eliminate `ManagedProtoBuffer`

2016-07-18 Thread Erik Eckstein via swift-evolution
The reason why `ManagedProtoBuffer` (the base class of `ManagedBuffer`) exists is to give the users an extra bit of type safety inside of the closure `initialHeader` passed to `ManagedBuffer.create()`. public class ManagedBuffer : ManagedProtoBuffer { ///