#wwdc2019: SwiftUI

From a developer standpoint, there’s no luxury display or mythical computer that can rival the big surprise Apple reserved for us yesterday: SwiftUI.

The actual true star of the show is a declarative UI framework that before yesterday was only rumored, and not for this year; cherry on top, it actually debuts on all platforms (iOS, iPadOS, macOS and even watchOS).

I never actually looked into React or similar development tools, but I played a bit with Cocoa Bindings, so I can see why having the interface actually reflect changes in the data model, and viceversa, is a truly big deal; an even bigger deal was the speed it releaved in the demo: seeing very few lines of code produce an UI that updates in realtime is a big leap from the tedious Build and Run dance, and the inverse process of tweaking the UI in the canvas and have the changes inserted inside the code looked like magic. Better, it is magic.

My plan immediately became to stay up really late after the SOTU (which ended at around 1:30 a.m. my time) and play with it for a good part of the night, but sadly Xcode 11 does not show nor let you interact with the canvas unless you’re running macOS 10.15 (currently not very viable on, cough, computers that run macOS without actually coming from Cupertino).

So for now I can only follow along the amazing tutorials Apple published, and try to wrap my mind around the Combine framework, which I understand is the second part of the equation, but that I wait for smarter people to explain to me in a tutorial / video of some kind in the next few days.

Before the event a friend joked about changing the Swift syntax again, but actually Apple set the stage for an even bigger change on how we write code and how fast we can iterate, and I am very excited for the possibilities.