It’s now possible to use if statements and switches wherever you are assigning a value.
Unfortunately (or perhaps fortunately) this does not work when passing a parameter, for instance to create the StringProtocol
inside the initialiser for a Text
view.
But since I can create local variables inside the view’s body
property anyway…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.