Oct-13-2016, 12:28 AM
(Oct-12-2016, 11:38 PM)wavic Wrote: This video is quite popular. I think it tells everything
I actually quite dislike that video. He comes off pretty damn condescending. Yes you shouldn't write a class when you don't need one which are the examples he shows. But if you do need one you should use one.
His examples deal with a lot of cases where people write place holders for future potential use cases. So yes, don't overthink and write a bunch of useless code for the ostensible reason of "future proofing" but nonetheless, if you need encapsulated state with associated methods, you should be writing classes.