News for hackers. Stuff that matters.
Re:The use of `class` for things that should be simple free ... by Barrin92 on Thursday May 28, 2020 @04:32AM (#23334891)
If you're at the point where you'd rather pass a state argument around rather than use an object you've thrown out OO categorically and there's no point to even discuss anything. The article in question talks about when it makes sense to use functions within the OO paradigm instead of classes.

Generally using classes when modelling persistent state is not an anti-pattern, because that's what classes are for.

There are no comments on this comment yet.