News for hackers. Stuff that matters.
Re:The use of `class` for things that should be simple free ... by fauigerzigerk on Thursday May 28, 2020 @04:14AM (#23334807)
The canonical answer is encapsulation. But in my view it's rarely a good idea to couple state related to an algorithm's invocation (e.g a cache) with the data structure itself.
Re:The use of `class` for things that should be simple free ... by noobermin on Thursday May 28, 2020 @04:47AM (#23334974)
It's almost as if a hard and fast rule doesn't work, ie., the point of the article.