Documenting Swift protocol

In Swift, I can write documentation at a protocol level now. There is a kick-ass feature added recently to Xcode 8 (beta 4). If I add documentation of function at the protocol level, it's available at the level of implementation. Look, I wrote documentation to Task.run() and…

Queues are not bound to any specific thread

It all started with this snippet [https://gist.github.com/jspahrsummers/af6ddfbabf3894bde981] from @jspahrsummers [https://twitter.com/jspahrsummers] #import <Foundation/Foundation.h> int main (int argc, const char **argv) { @autoreleasepool { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ dispatch_sync(dispatch_get_main_queue(), ^{ NSLog(…

Status of Portable Swift code

Portable Swift [http://swift.org] source code is so damn hard to do. Main problem is that OSX and Linux Swift is using different Foundation codebase. Linux is using SwiftFoundation [https://github.com/apple/swift-corelibs-foundation] and OSX is using Foundation [https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/…

CloudKit Security model

CloudKit [https://developer.apple.com/icloud/] security model is barely described in documentation, yet it's very important aspect of this cloud solution. I do care about privacy [https://privacyapp.io] and I believe privacy aspect is important when implementing Cloud driven solutions. The subject is not widely explained…

Overload Swift type ambiguity

I may define default type for overloaded functions. sometimes. This is Swift [https://swift.org/] return overloading that may lead to ambiguity: extension String { func encode() -> NSData? { return self.dataUsingEncoding(NSUTF8StringEncoding)?.base64EncodedDataWithOptions([]) } func encode() -> String? { return self.dataUsingEncoding(NSUTF8StringEncoding)?.base64EncodedStringWithOptions([]) } } I have two functions encode() that…