How would your code look if your language had a maximum logical SLOC size for classes of 1024? (I like 2^10.)
What other features would your language need to support the types of programs you write if this constraint were in place?
Re:I know this!
Aristotle on 2008-01-29T02:22:39
*wistful sigh*
Re: Language/Class Design Question of the Day
Sidhekin on 2008-01-28T18:12:53
Oh. For each class?
... right. Carry on.
It would look pretty much the same, and so the language would need no changes. In fact all the
But not all my code is OO, so it isn't all in classes. Until recently, I maintained a sprawling 8000 line program all in one file. OK, that includes documentation, but at a guess it's 5000 lines of code. While I did make a few changes during my time with the Maintenance Hat (added a couple of little bits of functionality, fixed some bugs) I was always itching to refactor it but never got the time. Part of the reason I didn't is because the test suite was nowhere near comprehensive enough.
The lack of good tests, incidentally, doesn't mean that the code is broken. It works really well and I don't think there are any outstanding bugs at all. Nor does it make it hard to find bugs when they're reported. But it does make refactoring hard and made certain types of changes hard to do.