> > An example of a simple plan is a simple "find" plan:
> > iterate through the set
> >         test each set member to see if it is the target; if it is, end the 
>iteration
> 
> Most computer scientists would (hopefully) call this the linear search
> algorithm -- and therefore be very worried about using it
> because it is O(n), proper searching should be O(log(n))
> (binary chop and binary tree search) or O(1) (hash table).

Not worried, no.  Every practicing engineer knows its sometimes best to
use linear search because its simple to write, understand, debug, and
modify if necessary.  For short non-critical searches its great.  It
appears regularly in production code.

And note:  "linear search" is a shared abstraction with a common
vocabulary.  It clearly qualifies as a plan which, according to your
previous mailing, is not appropriate.  Thus I think it is quite wrong
to separate patterns and plans so dogmatically.  What would you call
a pattern that only you know?  Moreover I would hazard to guess that
when paired programmers get together and code, they use a lot of shared
plans otherwise it just wouldn't work.

Andrew

- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED]  unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED]         help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]

Reply via email to