4 ms·
Yeah as nice as Swift is, Cocoa was designed for Objective-C. e.g. -[NSBezierPath setLineDash:count:phase:] takes a C array in Objective-C, but an UnsafePointe
by alextgordon 11y ago
Yeah as nice as Swift is, Cocoa was designed for Objective-C.
e.g. -[NSBezierPath setLineDash:count:phase:] takes a C array in Objective-C, but an UnsafePointer<CGFloat> in Swift.
Apple needs new API interfaces for their new language, and that will take time.
- SneakerXZ 11y agoIf you use this API very often from Swift you can introduce nice wrapper around it. It would be better to see these issues by Apple but I think they are minor and Swift overweights with its benefits.
- bitserf 11y agoThis will improve in Swift 3.0, via an improved mapping of Cocoa APIs into Swift (naming wise): https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md https://github.com/apple/swift-evolution/blob/master/proposa... At some point in the future I imagine we would also see native Swift APIs.