I think that at lot of these pollute the global scope unnecessarily or incorrectly, and many of them are semantically incorrect. It's also a massive framework that doesn't address a specific concern. It would be better packaged as a collection of μframeworks.<p>Some specific issues:<p>> Easily access your ViewController on top of your view stack:<p><pre><code> let topOfMyViewStack = topMostVC
</code></pre>
UIKit supports an arbitrary number of windows, so "your view stack" is not something that is definable.<p>> Easily access your screen width & height:<p><pre><code> print(screenWidth) // 375.0 on iPhone6
print(screenHeight) // 667.0 on iPhone6
</code></pre>
Which screen? iOS supports multiple screens - there's a reason that these things are scoped to instance properties of UIScreen.<p>> Easily run block of code:<p><pre><code> let myBlock = {
print("lol")
}
runThisBlock(myBlock)
</code></pre>
You can just call it directly with myBlock() - which the implementation presumably does.<p>> Easily convert between different types:<p><pre><code> var myDouble = myInt.toDouble
</code></pre>
Double(myInt) isn't really hard, and the "easy" version is <i>more characters</i>.<p>> Easily access ViewController sizes:<p>View controllers do not have sizes - views do.<p>I don't want to rag on the author too much, but I'd also like to add something about the tagline "How Swift standard types and classes were supposed to work". This seems needlessly offensive and incorrect - in all likelihood, Chris Lattner is smarter (or at least more educated on the subject) than you - or me! There's no need to say that he's doing his work incorrectly. Instead, a tagline like "useful extensions for the Swift Standard Library, Foundation, and UIKit" wouldn't imply that the Swift team wasn't doing their job. Save that for complaining about the inability to define a Monad protocol.
This library provides so many anti-patterns. "topMostVC" is going to be the source of a ton of bugs.<p>As for aesthetics, this library will be adopted by a lot of people who don't understand Cocoa conventions. If I saw it part of a project, I'd consider it a red flag.
Some of this is just poor style/naming conventions, some of it is simply implemented incorrectly and the rest of it removes necessary distinctions from important functionality.
The string indexing extensions are just terrible. There are good reasons why Swift does not provide these things out of the box even though objective-c did: <a href="http://oleb.net/blog/2014/07/swift-strings/#character-indices-and-ranges" rel="nofollow">http://oleb.net/blog/2014/07/swift-strings/#character-indice...</a>