[plt-scheme] a single module split across several files
You might try 'include' but compilation won't track dependencies for
those files (so it is probably a bad idea).
If I were too lazy to refactor, I would probably just live with a 6000
line file (but ... that's me :).
Check Syntax could make this job much easier.
You might also try units, but it might end up being more work than refactoring.
Robby
On Fri, Nov 21, 2008 at 12:42 PM, Daniel Roy <droy at mit.edu> wrote:
> I have a question about using modules/units and physical code organization.
>
> Simply put: can I split a single module across several files so its easier
> to work with?
>
> More details: We had been using the Pretty Big language and (load ...)
> commands to piece together a number of files totaling roughly 14,000 lines.
> I've recently moved the code into the modules framework (which seems to be
> necessary in order to get debugging across multiple files and other more
> advanced functionality to work in DrScheme). However, in the process, I had
> to (naively) concatenate a number of files together as they referenced each
> other. If they were separate modules, they would have had cyclic
> dependencies. That said, they aren't really cyclic -- they really are a
> single module. Unfortunately it's also 6000 lines of code. Using (load
> ...) doesn't work (at least my naive attempts at using load didn't work).
>
> Now, undoubtedly there is some re-factoring that could be done to identify
> reusable and generic components that I could separate out as other modules
> and reduce this file to a manageable size. But this is a research project
> not a software development one and the form and structure of the code is
> subject to radical changes. Can I get the benefit of modules (better
> optimization? debugging? etc?) without being forced to move dependent code
> into the same physical file?
>
> thanks,
> dan
>
>
> --
> Daniel Roy
> CSAIL/MIT
> http://web.mit.edu/droy/www
> (mobile) +1 617 872 3267
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>