[plt-scheme] Jane Street Summer Project 2009
On Tue, Feb 03, 2009 at 11:38:22AM -0500, Matthias Felleisen wrote:
>
> Let's conduct a Gedankenexperiment. You have a project that
> consists of files A, B, and C. A exports f, which B and C use.
> You rename f to g, via our fancy lightweight refactoring tool
> called CheckSyntax. Everything works.
>
> Then you return to project 2, which uses files A and D. D
> uses f from A. Argh, f is gone and the project is broken.
>
> (I have considered this before, but I just don't know how
> to do it properly.)
I've seen this before, and I don't have a good answer either.
But this particular set of dependencies suggests to me that A should not be
"in" either project 1 or project 2, but should rather be a library external
to both projects.
This breaks down, of course, because I haven't yet found a good way to
manage these sorts of "external libraries," especially when they're not
suitable for Planet submissions, for whatever reason.
(Oddly enough, this bites me more with LaTeX .sty files than with Scheme
modules. Say what you like about LaTeX as a language---I certainly
have---but it's enough of a PL to suffer from exactly this problem.)
Another possibility, of course, is that project 1 is a library that project
2 uses. I'm not sure what the right behavior is here. I'd considered
having CheckSyntax chase references into client libraries, but I suspect
that (aside from the implementation difficulties) this would require a
level of project management on the user's part that most would find
prohibitive. Alternatively, CheckSyntax could simply refuse to rename
identifiers that are part of the library project's public interface, but
that gets unnecessarily annoying when the programmer knows quite well what
he's doing, thanks, and wants to rename `f' anyway. So I don't really have
any ideas here.
Richard