Some bizarre thoughts on the nature of programming...

Douglas Brebner douglas+list at fang.demon.co.uk
Wed Jun 23 04:04:11 UTC 1999


Hello Peter

Sorry if this is silly, but can't the image itself can be considered
an object?
If so, then would mapping the image to a cell & the objects to the
cells internal mechanisms (enzymes etc) work?

On 22-Jun-99, Peter Smet wrote:
> David,
> 
> The reason I think OO has not helped or progressed as much as it could has
> to do with 'locality' - or 'coupling' as it is called by software
> engineers. If you look at most biological systems (and this is what the
> Swarm program was trying to demonstrate), each object ONLY knows its
> nearest neighbours. To use an extreme example, if every neuron in the
> brain was connected to every other neuron, the sheer volume of the
> connections would have caused it to explode many milleniums ago. While
> every good programmer strives to minimize coupling, the level of coupling
> in programs is surely orders of magnitude greater than that seen in
> biological systems. The challenge is to design programs where every object
> only knows its immediate neighbours.

How strongly coupled are a cells internal systems?

> While I love all of Kent Beck's ideas with regard to refactoring, I worry
> that everytime you refactor the coupling seems to increase. To put this
> into an extreme form, in a perfectly factored program, method xxx will
> only be specified in ONE place, in ONE object. Any object that wants to do
> anything even vaguely similar to method xxx MUST call method xxx to do it.
> By definition, this means it is dependent on the other object providing
> method xxx. If it wanted to be independent, then it should implement
> method xxx itself, but this would introduce unnecessary and evil code
> duplication. So a well factored program will potentially show more
> coupling than a poorly factored one. 

Every Squeak cell/image can use it's internal system.

>> The real object difference arises at the analysis and decomposition
> levels -
>> but only if the analyst is steeped in object philosophy and culture.
>> 
>> Alan Kay's object is metaphorically a cell and like a biological cell
>> perfectly capable of participating in what Maturana and Varela called
>> "structural coupling" to evolve more complicated and complex (there is a
>> important difference between complicated and complex)organisms
>> (applications).
> 
> 
> The difference is that a liver cell doesn't assume the existence of
> aStream cell when it screams "self printOn: aStream". It only knows harry,
> jack, and gladys, the three liver cells that live next door. Don't get me
> wrong, I think OO is the best we have for dealing with complexity in
> computer problems at the moment - I was just musing on how it could be
> extended to be composed of objects orders of magnitude simpler than what
> we have now.

Oops, I think I'm suggesting the opposite. :(

-- 
Douglas





More information about the Squeak-dev mailing list