From: Andreas K. <and...@ac...> - 2009-05-25 19:54:34
|
Michał Antoniewski wrote: > Hello. > 3. Generally, I'm implementing algorithms as normal procedures. Then > after writing tests and checking if those procedures work well, they > should be placed in tcllib ( just like hierarchy at SVN says). Do you > accept this approach? Having seen the code now I believe I begin to understand what you are doing and asking here. In essence you are writing each algorithm X as a set of global procedures in a file X.tcl, including basic test cases at the bottom of file. Then, when you are satisfied with the implementation you plan to transfer the set of procedures to the struct/graphops.tcl file, and rename them so that they are in the proper namespace. The test code you further plan to transform into a set of regular test cases which are then put into a .test file under struct/graph/tests directory. Is this understanding of your planning correct ? The question you should ask yourself here is What are the advantages, if any, of this approach over the alternative, i.e. of working directly within the struct/graphops.tcl file, and the tests files under struct/graph/tests ? Conversely, what are the disadvantages of this approach ? One disadvantage, in my opinion, is that you are doing something in two steps (code, and transfer) where one step would be sufficient (code). This is a disadvantage in my eyes because the transfer step is simply one more place where bugs can be introduced. Does that make sense to you ? Andreas. |