News for hackers. Stuff that matters.
Re:Functional calisthenics by CuriouslyC on Friday October 20, 2017 @09:12AM (#15515461)
I don't think that no classes without state is a good hard and fast rule. In some languages classes are the easiest way to get a new namespace, and thus in combination with static methods they are useful in producing fluent APIs (which I believe are a good design choice). You could of course achieve the same result with modules but I'd argue it's cleaner to have an inline class than a separate file when you're only adding a couple of functions.

There are no comments on this comment yet.