正しいかもしれないですし、正しくないかもしれません。
わかる方教えてください
参考
https://developer.apple.com/reference/uikit/uitableview/1614878-dequeuereusablecell
https://developer.apple.com/reference/uikit/uitableview/1614891-dequeuereusablecell
本題
UITableView
open func dequeueReusableCell(withIdentifier identifier: String) -> UITableViewCell? // Used by the delegate to acquire an already allocated cell, in lieu of allocating a new one.
@available(iOS 6.0, *)
open func dequeueReusableCell(withIdentifier identifier: String, for indexPath: IndexPath) -> UITableViewCell // newer dequeue method guarantees a cell is returned and resized properly, assuming identifier is registered
UITableVIewのdequeueReusableCellメソッドにindexPathを引数に持つものと持たないやつがいます。
動作は基本的に同じで、違うのは返り値がnilの可能性があるかないかです。(他にも違うところがあるかもしれませんが、調べた感じわかりませんでした。)
dequeueReusableCell(withIdentifier:for:)
の方のメソッドを使えば毎回guardでnilチェックをしなくてもよくなりますね!
結論
dequeueReusableCell(withIdentifier:for:)
を使いましょう!