Neven wrote:
> My gripe is the object pascal inconsistency that allows classes in the
> same unit to reference 'private' properties which leads to these sort of
> problems
>
> They could have exposted the list in this case
Yeah. I have mixed feelings about the 'private' only applying outside a
unit. It can lead to somewhat sloppy visibility decisions.
Delphi has the 'private' rule because Object Pascal lacks the 'friend'
concept of C++. Mind you, there are OO purists who think that 'friend' is
<MIKE-MYERS>
the froo-its of the Deeee-vil
</MIKE-MYERS>
Sometimes, you want a bunch of classes that want play with each others
privates under the covers (that came out rather saucier than I intended :-)
Particularly for Observer and Chain Of Command style design patterns e.g.
TDataSet, TDataSource, TDataLink.
You either need 'friend' or the unit trick to be able to implement them
without exposing more than you really want to.
Personally, I'd rather see 'friend' in Delphi but that's probably just me.
TTFN,
Paul.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"