[Lazarus] Circular references and code quality
nc-gaertnma at netcologne.de
Tue Oct 4 18:32:17 CEST 2011
"Jürgen Hestermann" <juergen.hestermann at gmx.de> hat am 4. Oktober 2011 um 17:41
> > In other words: It's nicer to work with ten 3000 lines units than
> with one big 30.000 lines unit.
> Why that? I would prefer the one unit including everything over having
> multiple files (i.e. when searching for something). If it has no other
> impact than I would always vote for having lesser files instead of
> cluttering all into many files.
It's matter of taste. I only gave one possible reason for splitting up classes.
Everyone has to decide when it is appropriate and when not. Obviously the limits
vary with every programmer.
> > 2. classes were split instead of using parameterization. Instead of
> adding a parameter to many methods, an abstract class and multiple
> descendants are defined. This almost always duplicates code, but the
> code itself has far less if-then-else blocks. OTOH it can create more
> if-then-else outside the split classes.
> Code is much more readable (understandable) when if-then-else blocks and
> no OP-methods (like descendants) are used. You see all relevant code in
> one block and there is no need to gather it from multiple places.
Well, that is not true in general.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus