Design: Generics as Templates final class CardsViewController<ViewModel: CardViewModel, DataSource: CardDataSource>: UIViewController { private let viewModel: ViewModel private let dataSource: DataSource init(viewModel: ViewModel, dataSource: DataSource) { self.viewModel = viewModel self.dataSource = dataSource super.init(nibName: nil, bundle: nil) } @available(*, unavailable) required init?(coder aDecoder: NSCoder) { fatalError() } }