ViewModelBindable has always be a confusing wording, since most of the times it's the ViewModel binding itself to a view (and not the opposite, if the view is not interacting directly with it's view model but only reading properties)
I suggest a new ViewModelCompatible protocol, with associated type for view model.
We should use internally use ViewModelCompatibleType, without associated type, to use it independently from internal type, and then force implementations to explicitly declare which viewModel will be used.
ViewModelBindable
has always be a confusing wording, since most of the times it's the ViewModel binding itself to a view (and not the opposite, if the view is not interacting directly with it's view model but only reading properties)I suggest a new
ViewModelCompatible
protocol, with associated type for view model. We should use internally useViewModelCompatibleType
, without associated type, to use it independently from internal type, and then force implementations to explicitly declare which viewModel will be used.This should lead to less
as?
typecasting.