From: SF M. E. <el...@us...> - 2004-03-12 22:22:10
|
> types.h is hell --- too much conditional compilation, lumps different > things together (e.g. dynamic loading and gc). I recently broke it into > several separate input files. Please review the code in > 'sandbox_jakacki_frontend1' branch and let me know if this issue is still > there. http://cvs.sourceforge.net/viewcvs.py/*checkout*/opencxx/opencxx/src/types.h?rev=1.7.4.1 Yes - it contains this line: #include <string.h> // For size_t > If you see any places that 'const' may be injected in relatively painless > way, let's inject it. Please look at the methods that start with "bool Is..." like in the files "member.h" and "token.h". > I am not aware of any such efforts. Before going into these areas I would > however first try to determine if people really need it, because it looks > like a huge work. Are there any code parts that use (blocking) input or output functions? Would your file operations benefit from multithreading? Can any steps in the procecssing be separated into cooperating and asynchronous tasks? The "huge" work can be split into smaller exercises. > I was not satisfied with defines either, so I wrote simple script that > generates all these declarations at configuration time. Please review it > (it is in sandbox_jakacki_frontend1 branch) and let me know what you > think about this solution. This script can generate objects or variable definitions that will use templates if the support for this technique will be stable. > 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 > What() methods? There are so many. Can your class browser of the development environment show the occurences? > Is this one item or two? As far as I understand "fat interface" means that > it handles lots of different functionalities. I don't see any connections > of "obesity" to ordering of public, protected and private parts of iface, > please correct me if I am wrong. 4.1.1 Which is the number of methods or attributes when you begin to think about a "diet" for the classes? ;-) 4.1.2 The ordering can be perhaps performed by code beautifiers. But the logic grouping might show dependencies that should be expresses by a specific class. > OpenC++ is not perfect, but is fairly modular and unlike many other projects > it seems fairly easy to improve it in small steps. Please let me know what > you think about this strategy. It is fine. The evolution will be harder for the fat classes. Who does dare to split the rocks into handy and manageable bricks? > > inline std::ostream& operator << (std::ostream& s, const Ptree& p) > > { > > p.Write(s); > > return s; > > } > Why do you think it is better? You do not need to care about null pointers. > Perhaps they were not available when the code was created. I would not touch > this are, unless we need to do some other work in token.h . It works as it > is, it does not show any bugs, rewritting this part would have only > educational purpose and this is not the aim of this project. Do you think it > is reasonable? Are international character sets (UTF-8, Unicode) supported by the current interface? How do you think about the limit for single byte characters? > Also I encourage you to get yourself your sandbox, since many of your > proposals are worth implementing immediately. If you decide to contribute, > please send me your SourceForge ID, so that I can add you to the project. My service can be code review at the moment. I assume that the "coding" should be done after a common agreement or a decision by the project leaders. Would anybody like to publish which software uses the OpenC++ tools? Are any related links useful? |