3 ms·
These types of situations are very common in "view" and "view controller" classes. Someone tries to DRY a complex view that handles takes in many options and p
by heheehehwiii 10y ago
These types of situations are very common in "view" and "view controller" classes.
Someone tries to DRY a complex view that handles takes in many options and parameters to address several use cases.
A redesign or requirements change happens and now you have an over complicated view class that needs to get deconstructed. Or you can try and build on top of /subclass/extend an over complicated thing. Neither is ideal.
Reading and understanding code is A LOT harder and time consuming than writing new code. So in reality, this view would just get rewritten (duplicated) anyway.