From: Eric M. <er...@aj...> - 2000-07-25 22:28:02
|
On Tue, 25 Jul 2000, <Miguel Sofer wrote: > Point (a) implies inlining some code which is in other files > (tclVar.c, tclBasic.c, maybe tclCompile.c). I have been "copying and > pasting" in my preliminary tests, but realise that this is not very > good - difficult maintenance, even if well documented. For instance, > any change in the Var type may have severe implications in the > executor, the decoupling is lost ... > > A solution might be to put some of that code in macros in a common > header file. I kind of liked the idea of touching a single file > (actually, a single function!); this option would imply modifying also > the other files ... and maybe making life difficult for their > maintainers/updaters. I'd rather not ... I'm generally opposed to using macros for anything but fairly small (less than about 4 lines of code) functions. I think overuse of macros can lead to badly structured code. Perhaps there are a few small, critical sections of code that would benefit from this, however. I'd like to see what code you are specifically considering modifying this way. This sort of leads into a related issue with TclExecuteByteCode, which is that there is substantial duplication of functionality between TclExecuteByteCode/Tcl_*CompCmd and the various Tcl_*ObjCmd implementations. I don't know of a good solution to this, but it would surely make Tcl easier to maintain (not that it is really that bad right now) if we could consolidate that code. I'd like to get some other peoples brains working on this problem; maybe we can come up with something reasonable for 9.0. Eric Melski The Other Tcl Guy ericm at ajubasolutions.com Ajuba Solutions -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |