Subj : Re: Polymorphism sucks [Was: Paradigms which way to go?] To : comp.programming,comp.object From : topmind Date : Tue Jun 28 2005 05:59 pm Chris Sonnack wrote: > topmind writes: > > > Brush Teeth > > ....*.find.toothbrush > > ....*.find.toothpaste.tube > > ....*.open.toothpaste.tube > > ..........o.Put.thumb.and.pointer.finger.on.cap > > ..........o.turn.fingers.counter-clockwise. > > ....*.clean.teeth > > ..........o.put.brush.on.teeth > > ..........o.move.back.and.fourth.vigorously > > ..........o.repeat.above.step.100.times. > > ....*.clean.up > > ..........o.rinse.brush > > ................+.turn.on.water > > ................+.put.head.of.brush.under > > ..................running.water.for.30.seconds > > ................+.turn.off.water. > > ..........o.put.cap.back.on.toothpaste > > ..........o.put.all.items.back.in.cabinet > > > > Most people would produce a fiarly similar hierarchy without even > > seeing this one. > > LOL! You mean to say it is so naturally tree-shaped that most people > would naturally produce a tree? > I have agreed that *people* naturally relate to trees. Thus, they tend to produce algorithms that have a tree-shaped division of tasks. It is not that tasks are inherently are tree-shaped, it is that people are more comfortable using trees to describe them. However, on a larger scale algorithms are not pure trees because usually named tasks (subroutines) eventually come in to play as we scale up. Subroutines break the tree because they are cross-branch links. IOW, on a small scale or *informal* discussions (which is what the above is), trees are a decent useful lie. -T- .