New (!!) on Metal By Example: Writing a Modern Metal App from Scratch (Part 1) http://metalbyexample.com/modern-metal-1/ Same teapot, new language.
-
-
Replying to @warrenm
Warren writing Swift! There were as many implicitly unwrapped optionals as I expected.
Next installment needs some Unsafe* types.1 reply 0 retweets 2 likes -
Replying to @gregheo
How do you avoid IUOs in your view controller interfaces? Genuine question
1 reply 0 retweets 0 likes -
Replying to @warrenm
Definitely can't sometimes. I prefer initializing properties directly like `let mtlView = MTLView()` rather than have an IUO and init in viewDidLoad if possible.
1 reply 0 retweets 1 like -
Lazy properties are a great option too
Gives you the deferred loading you usually want in VCs, while still getting rid of "Non-optional optionals":
lazy var mltView = MTLView()2 replies 1 retweet 13 likes
I have, over the past four years, developed a rather nuanced opinion about this, I think. Obj-C is probably too lax about this. But Swift is definitely too strict about it, in ways that are distracting and detrimental.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.