WWDC 2021 Developer Tools Wishlist

WWDC 2021 starts Monday. Here are some of the things I hope to see with the developer tooling.

Xcode

  • Playgrounds are still super-buggy. I get red-squiggles and false errors everywhere in source files.
  • Ditto with SwiftUI previews. Even for simple stuff, I constantly need to reset them.

Swift

  • Support for narrowing, like in Typescript. With narrowing, your conditionals are taken into account when checking for the correctness of your code. So if you check is something is not-nil, then inside the if block, I can use it. This is better than an if let, because that creates a new constant and you cannot modify the obj using it. There are also more complex possibilities that are not possible with if-let.
  • Compilation speed.

I write Typescript in VSCode which is a freaking Electron app and it smokes Xcode with Swift.

It checks for errors as you type and it’s fast, never wrong, and always works. Typescript is also a type-inferring language and JSX is similar enough in spirit to SwiftUI. I have no idea why Microsoft can do this and Apple cannot.