From: Grzegorz J. <ja...@he...> - 2004-03-15 03:10:27
|
On Sat, 13 Mar 2004, SF Markus Elfring wrote: > > I am under impression that each 'Ptree...::What()' returns something else > > (discriminator), similarily each 'Ptree...::Translate()' calls different > > method from Walker iface. Can you point out what classes have the same > > Will abstract base classes be available for them like it was discussed for "AbstractWalker"? Yes, if somebody finds time to implement it. > > Again, this very much depends on the class semantics. Sometimes compiler > > generated implementations are OK. Please note, that due to GC even when > > class has value semantics and it contains (garbage collected) pointers, > > default copy ctor and assignment operator are ok. On the other hand, > > I suspect that in several places those functions should be blocked > > (by privation), but are not. > > Please derive such classes from an interface class like > "http://boost.org/libs/utility/utility.htm#Class_noncopyable". That's a good idea, however somebody needs to do it. > I have not got detailed knowledge about your class library so far to > decide where objects should not be copied. I hope that other > developers are in a better position to do that. IMO this is wrong approach to collaborative open-source development. If you see something can be done better, go and make it better. Don't count on other people implementing your vision. Pointing out problems is not enough. We need action, talking alone is not going to move this project any further. > > Some classes are designed to be derived from, some > > are "final". In particular classes that have value semantics (= define > > operator() and copy ctor and generally behaves as values) IMO almost ^^^^^^^^^^ should be 'operator=()' > > always should be "final". But there may also be omissions. Please bring > > the names of these classes and I will comment on each of them > > particularily. > > Value objects should not have any virtual methods. Agreed. > I suggest to look for missing virtual destructors in all classes that > contain virtual methods. I think this advice is not new to people on this list ("Effective C++" has it). If you want to help please post the exact locations. > > The way that I would strongly recommend is to redesign components one by one > > and go from the old design to the new design in evolutionary steps. The > > smaller the components you replace, the easier it is to manage. Sometimes it > > pays off to refactor the old code to insulate some part of it before > > rewritting them. That way you have the running thing all the time. > > Would you like to use the methodology > "http://en.wikipedia.org/wiki/Extreme_Programming" Some bits of it. In fact some bits we already use, e.g. automated regression testing. What I am trying to get working now is unit testing for parser. > that is supported > by the tool "http://www.xplanner.org/"? I don't know Xplanner (and I do not have time to learn it at the moment, sorry). > I suggest to use multiple inheritance in more cases. Where (I mean class names) and why? Thanks Grzegorz ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2004 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |