Handling non-optional optionals in Swift
John Sundell

  1. The first force unwrapping could also be avoided by using a local variable:
    let tableView = UITableView()
    self.tableView = tableView
  2. The Null Object Pattern is also a good way to avoid optionals alltogether: https://medium.com/swift-programming/null-object-pattern-in-swift-1b96e03b2756
Like what you read? Give Fabian a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.