This is the mail archive of the
mailing list for the frysk project.
Re: the status automation machine graph for frysk
- From: Sami Wagiaalla <swagiaal at redhat dot com>
- To: Sami Wagiaalla <swagiaal at redhat dot com>
- Cc: Mark Wielaard <mark at klomp dot org>, Wu Zhou <woodzltc at cn dot ibm dot com>, frysk at sources dot redhat dot com
- Date: Tue, 04 Jul 2006 14:43:49 -0400
- Subject: Re: the status automation machine graph for frysk
- References: <Pine.LNX.firstname.lastname@example.org> <email@example.com> <44A42875.firstname.lastname@example.org>
Duplicate code worries me too. Inheritance is a solution but as Cagney
- Some methods like handleAddObserver() and handleDeleteObserver()
always do the same thing and never actually do any state transition.
This adds a lot of (duplicate) code without being clear what it has to
do with with the actual state machine.
before: the flat code is easier to read. Also I would much prefer that
I accedentaly forget
to implement a function casing frysk to crash than accidentally pick
up a function from a
parent and do incorrect handling.
One way to get rid of duplicate code is to have static utility functions
that do the repeated
code. I know this doesnt feel very OO... what do u think ?