[Tutor] Sun says: Don't use Java, use Python!
alan.gauld@bt.com
alan.gauld@bt.com
Tue Feb 11 19:09:10 2003
> The script will be over 3,000 lines long.
Wooooh! Way too long. Break it into modules.
I use the import/execute trick if my main module is a few
hundred lines, but many hundreds and certainly thousands
means you should put it in modules. Provided you can group
the functions into some kind of logical grouping then it
should help long term maintenance
> In order to parse the RTF, it has to make a dozen or so
> passes through the file.
The RTF file I assume? Therefore the code is oinside a loop?
In which case the compilation of the entire module will
already be done.
> The newer perl script (not the one above) makes a module for each pass
> through the file. I thought this was bad design, because I had a dozen
> or so modules.
Assuming you mean a different function (perl sub?) then thats fine,
put them in modules. I assume you don't mean thast your script is
dynamically creating code modules and executing them as it goes?
Now that would be interesting code!!
Alan G