Re: The wisdom of the object mentors

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Tue, 27 Jun 2006 09:38:46 +0200
Message-ID: <nfbbzwnce7g5.hk3zq3dns1ww.dlg_at_40tude.net>


On 26 Jun 2006 19:06:43 -0700, Marshall wrote:

> Bart Wakker wrote:

>> frebe73_at_gmail.com writes:
>>>
>>> A algorithm could must obviously know about the data structure.
>>
>> Not at all! I'm currently writing many algorithms that get their data
>> passed in as java objects. The algorithm does not need to know where
>> the data came from and how it is stored in the database.

>
> "Where the data came from" is not the data structure.

Replace "where the data came from" with "the data structure at the place they came from."

> These methods you are writing, are they declared to receive
> arguments of type java.lang.Object? No? Then the objects
> support some interface, and that interface is the logical
> data structure.

Once you admit that they need not to be same, you do the first step to an abstraction of.

> An algorithm must obviously know about the data structure.

[ my behaviorist's hat on ]
Algorithm is a part of implementation of 'the' data structure. [ hat off, bow out ]

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Tue Jun 27 2006 - 09:38:46 CEST

Original text of this message