I was implementing UITableView
in Swift and comparing it to Objective-C counterpart.
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
From Swift I'm returning an unwrapped optional. If i know I'm returning a non nil optional then why is the return type an optional at all? I'm also passing in uitableview as an unwrapped optional. The same wisdom applies.
It makes sense if I'm returning an optional and using a question mark to say i don't know if I'm returning a value or nil.. But I don't understand this specific case