3 ms·
I've never gone quite as extreme as 1 class == 1 function, most of the best code of read/written has been very similar, each method has a simple input/output wi
by flukus 10y ago
I've never gone quite as extreme as 1 class == 1 function, most of the best code of read/written has been very similar, each method has a simple input/output with as little state as possible. The program itself becomes an assembly of these simple methods.
I'd be worried that it could cause the logic to be too spread out though. Jumping though a dozen classes for what could be done in one with a few functions is never fun. I've come to loath the "refactor into method" refactorings that IDE's come with for this reason (sometimes it's worth repeating yourself).
I'm working on a side project that would be particularly amenable to this now, so it might be worth trying out.