Earlier quoted context omitted.
Wow, it seems rather arbitrary. Can you elaborate?
Yes, it's arbitrary and there are of course exceptions and perhaps domains where it may not apply at all. It's just a recurring observation that I've made (mostly but not only) in dynamic languages. Pretty much all good code that I've read or written was compartmentalized into units of roughly 500 LOC. A big program may be composed of many such units, but it was almost always a bad sign when a divisible part would ex…
Programs should be Small
71–75 of 75 posts
Re: Programs should be Small
#72Earlier quoted context omitted.
Yes, it's arbitrary and there are of course exceptions and perhaps domains where it may not apply at all. It's just a recurring observation that I've made (mostly but not only) in dynamic languages. Pretty much all good code that I've read or written was compartmentalized into units of roughly 500 LOC. A big program may be composed of many such units, but it was almost always a bad sign when a divisible part would ex…
So, you actually mean functions instead of programs?
I mean an isolated unit that could be ripped out at any time and would be immediately useful on its own.
Anyway, abecedarius (below) has phrased it better than I could.
Re: Programs should be Small
#73Earlier quoted context omitted.
So, you actually mean functions instead of programs?
No. I mean an isolated unit that could be ripped out at any time and would be immediately useful on its own. Anyway, abecedarius (below) has phrased it better than I could.
Re: Programs should be Small
#74Earlier quoted context omitted.
No. I mean an isolated unit that could be ripped out at any time and would be immediately useful on its own. Anyway, abecedarius (below) has phrased it better than I could.
Those 'isolated units' are commonly called libraries then.
Re: Programs should be Small
#75Earlier quoted context omitted.
Those 'isolated units' are commonly called libraries then.
No. They are called "module".
Also, a library can be thought of as a collection of modules.