Re: [swift-users] How to malloc in Swift 3

2016-09-23 Thread Svein Halvor Halvorsen via swift-users
var bitfield: UnsafeMutablePointer? bitfield = UnsafeMutablePointer.allocate(capacity: 888) > 23. sep. 2016 kl. 10.47 skrev Gerriet M. Denkmann via swift-users > : > > This used to work in Swift 2.2: > > var bitfield: UnsafeMutablePointer? > bitfield =

Re: [swift-users] AnySequence and type erasure

2016-06-23 Thread Svein Halvor Halvorsen via swift-users
2016-06-18 10:23 GMT+02:00 Dmitri Gribenko : > On Fri, Jun 17, 2016 at 12:37 PM, Svein Halvor Halvorsen > wrote: > > Ok. Good to hear that I'm not too far off :) > > > > Can you provide me with an example of a sequence type or two that has > some >

Re: [swift-users] AnySequence and type erasure

2016-06-17 Thread Svein Halvor Halvorsen via swift-users
com>: > On Fri, Jun 17, 2016 at 1:39 AM, Svein Halvor Halvorsen via > swift-users <swift-users@swift.org> wrote: > > I'm sure people here know about the problem that AnySequence, > AnyGenerator, > > etc solves. > > In Swift, a protocol can have an associated type, wh

[swift-users] Unavailable initializers in -Swift.h

2016-06-08 Thread Svein Halvor Halvorsen via swift-users
Hi, In Objective-C, I've often attributed initializer from super classes as unavailable. Like this; @class Dependency; @interface SomeClass : NSObject - (nullable instancetype)init __unavailable; - (nonnull instancetype)initWithDependency:(nonnull Dependency *)dependency; @end This makes