The Decade of Swift
&gt; That’s why Swift’s expressive and very lightweight syntax<p>And a few paragraphs later:<p><pre><code>  extension Array {
    func sorted&lt;T: Comparable&gt;(
        by keyPath: KeyPath&lt;Element, T&gt;
    ) -&gt; Self {
        sorted { $0[keyPath: keyPath] &lt; $1[keyPath: keyPath] }
    }
  }
</code></pre>
I can&#x27;t say this is lightweight any longer.<p>My greatest gripe with Swift comes not from Swift itself but from its standard library. When most new languages start with their own standard libraries that are usually interfaces towards C APIs or POSIX, Swift&#x27;s Foundation is half of MacOS and then some.<p>I recently needed to read some data from a file in Swift, and it took me quite some time to realise there was no fopen equivalent. Read&#x2F;write files is a function on String? And getting a file handle is an excercise in figuring out proper dir names and user enums? [1]<p>There are a few other weird things in the language itself like guards which IMO are an entirely unnecessary construct that can be as easily solved with regular ifs. Or Optionals that have no way of working with them except unwrapping them (either with ! or via guards).<p>SwiftUI, however, is a very interesting approach, and I hope there are more frameworks (especially UI frameworks) like this.<p>[1] <a href="https:&#x2F;&#x2F;twitter.com&#x2F;dmitriid&#x2F;status&#x2F;1201441652507844608" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;dmitriid&#x2F;status&#x2F;1201441652507844608</a>