Re: [Ctool-develop] little fixes
Brought to you by:
flisakow
From: Steven S. <ste...@cs...> - 2003-07-31 22:23:22
|
Shaun Flisakowski wrote: > As for your comment about vectors, cTool was originally written in C (as > the poorly named "CTree", which I now know is also a database product). > With version 2.0, I changed over to C++ so a class hierarchy could be > used to clean up the resulting AST - I was not looking to rewrite from > scratch using C++. I know about CTree. I've used that too. CTool is a huge improvement in usability over CTree, the interfaces are much cleaner. The latest program I tried to write I started with CTree because that's what I had handy and got into a real mess. When I changed to CTool, all the complexities disappeared and I could spend my time concentrating on deciding what I wanted to do instead of how to do it. However, CTool is still showing its C roots. Too much of the internal workings of the data structure are exposed. This makes it very difficult to change any detail of the implementation. For example, suppose I had needed a fast insertBefore method. This would have required updating the Statement data structure to be doubly linked. Since the next pointers are exposed, I'd have no control over what external code is using them to manipulate the data structure. If the manipulation did not take into account the new pointers I would have needed to add, then the result would have been a complete mess. Hiding all the implementation details will allow future changes to the internal workings. At the moment you don't even have to change the implementation, just hide all the variables and work out what actions are needed on the objects. Hiding the variables, however, will break any existing program that relies on the current implementation. It would have to be reserved for the next major version. Do you have a good idea what sort of tools people are building with CTool amd hence what manipulation options they need? - Steven -- ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ********************************************************************** |