[Lazarus] OOP basics - 2

Alexander Klenin klenin at gmail.com
Thu Apr 15 09:47:30 CEST 2010


On Thu, Apr 15, 2010 at 06:58, Juha Manninen <juha.manninen at phnet.fi> wrote:
>> It is all a matter of design.
>
> Not only. Sometimes many classes are tightly dependent on each other.
> It doesn't mean the design is bad, they just are logically close and
> interdependent.
> Some other problem scope allows one-way dependency between classes.
> It doesn't make the design better.

I agree with Michael here. "Put everything in one big file" is a pure evil,
equivalent to "I do not want to think about proper design, let's just
pile all the code in one big heap"

>> In more than 20 years of pascal programming, I never encountered this
>> problem.
> Lazarus core itself has such code. Earlier I tried to understand Designer,
> ControlSelection and Object Inspector code.

Yes, Lazarus has this "one big file" problem it and it is horrible.
I tried to fix some parts of it, but my fixes were rejected due to
backwards-compatibility concerns.
This highlights yet another reason to design the code properly --
after you create
the big mess, you might not be able to untangle it even if you wanted to!

-- 
Alexander S. Klenin




More information about the Lazarus mailing list