Yesterday I posted my watchOS WWDC wishlist, which is driven by what I am seeing in building Sprint-o-Mat.
I recently started working with Typescript and VSCode on an open-source project that needs a Swift and TypeScript version of the same functionality. I wrote a Swift version, and then did a very faithful (almost line-by-line) port to Typescript, which I did not know at all before starting. I never used VSCode (or Atom) before starting.
Microsoft makes excellent developer tools.
My project is admittedly very small, but luckily I can see how it works with with a large project because a minimal React site with Typescript has 48k files of dependencies. VSCode has nearly instantaneous code-completion and real-time error reporting. A minimal app in Xcode isn’t nearly as fast or reliable.
The combination of VSCode and Typescript makes Xcode and Swift look a decade behind. It’s comparable to Apple’s lead in chip design and the advantage that gives to its products — that’s the kind of lead Microsoft has in developer tools. Luckily for Apple, that advantage mainly flows to in-browser and server-side development, where Swift has effectively no usage.
Xcode / Swift Wishlist
- Make Xcode reliable and fast
- Make Swift compilation reliable and fast
- Make Swift type inference flow knowledge about values into conditionals. Here’s a simple example:
let x = (anOptional != nil) ? funcExpectingNonNil(anOptional) : fallback
We (and Typescript) know that
anOptionalis not nil in the call to
funcExpectingNonNil, but Swift does not.