News for hackers. Stuff that matters.
Re:Scalable Program Architectures by loup-vaillant on Tuesday April 15, 2014 @06:58AM (#7591184)
> It's actually the same amount of code in either case.

Which cases are you comparing? I was just saying M+N ≠ M×N, and that solutions that forces M×N are bogus.

> If this is possible (which is very problem-dependent), then it's just as easily solved with inheritance.

True. Then again, you don't need the visitor pattern.

Re:Scalable Program Architectures by quacker on Tuesday April 15, 2014 @11:28AM (#7592300)
I was just saying M+N ≠ M×N, and that solutions that forces M×N are bogus.

Agreed. I was clarifying that converting your code to use visitors does not force an order of magnitude increase in the amount of code. If you start out with O(M+N) without visitors, you'll still have O(M+N) code after converting to visitors. Although, visitors are generally better appreciated when managing O(M*N) code than when managing O(M+N) code.

Re:Scalable Program Architectures by loup-vaillant on Tuesday April 15, 2014 @12:03PM (#7592560)
Yep.