5 ms·
My experience of OO programming - by the end I found the following style worked best: -> always using pure abstract base classes -> constructed those implementa
by Patient0 11y ago
My experience of OO programming - by the end I found the following style worked best:
-> always using pure abstract base classes
-> constructed those implementations using factories (which in turn, were pure abstract base classes)
-> almost always made my implementations immutable
which after a while, I realised, was just functional programming with more boiler-plate.
- tracker1 11y agoNot mutable, but tethered state, I think OO/Objects/Classes work slightly better when used as a means of tethering state/presentation/events... not that they need to mutate... for example the React.Component via ES6-style classes doesn't bug me as much as some... but I use it sparingly, most of the rest is more functional.