Revised draft of SRFI 103, 104
David Van Horn
(11 Dec 2009 16:03 UTC)
|
Different dialects under the same root
Vitaly Magerya
(11 Dec 2009 18:12 UTC)
|
Re: Different dialects under the same root Derick Eddington (12 Dec 2009 01:48 UTC)
|
Re: Different dialects under the same root
Vitaly Magerya
(12 Dec 2009 12:16 UTC)
|
A utility for renaming old-style file names
Derick Eddington
(12 Dec 2009 06:20 UTC)
|
Re: A utility for renaming old-style file names
Göran Weinholt
(25 Dec 2009 19:37 UTC)
|
Re: A utility for renaming old-style file names
Derick Eddington
(26 Dec 2009 22:54 UTC)
|
Thank you for the feedback. On Fri, 2009-12-11 at 20:04 +0200, Vitaly Magerya wrote: > > Rename R6RS_LIBRARY_PATH to SCHEME_LIB_PATH, because multiple dialects > > can use this environment variable because they can avoid conflict by > > using different file name extensions. > > Derick, this change is problematic. Let's say there are two systems: > Scheme Foo and Scheme Bar, and both of them have library (baz). I'm not sure if you're saying those two systems implement the same dialect or different dialects, so I'll address both possibilities. With the previous revision which didn't support different file name extensions for different dialects, different dialects could not share the search paths environment variable because different dialects would be using the same extension and so a file for one dialect could unavoidably shadow a file for another dialect. With different extensions, that problem doesn't exist and different dialects can share the environment variable. I address the points you made, below. > Aside > from the fact that putting files from different libraries in the same > folder defeats the purpose of folders, This SRFI's search paths supports multiple folders, which allows having different folders. The purpose of folders is grouping, and different people have different ideals of how they'd like files grouped. What I've been imagining is that different dialects will have separate folders and that same-dialect system-specific files will be in the same folder, but this SRFI supports doing it differently. Different dialects don't have to have separate folders, because different dialects should have different extensions, and so, in the same folder, conflicts of different-dialect library files are not possible (but auxiliary file conflicts are possible). Same-dialect system-specific files can be accomplished by using separate folders for the different systems, instead of using system-specific extensions and having system-specific files in the same folder. This SRFI allows the search paths to be initialized with additional folders before or after those from SCHEME_LIB_PATH, and so systems can add system-specific folders in which system-specific libraries exist. Since that is system-specific, exactly how that is coordinated is outside this SRFI. > we will have conflicts if: > > * both implementations of (baz) ship with a README or a LICENSE file; If the different implementations of (baz) are for the same dialect: They are necessarily system-specific. If the different implementations are distributed separately and have files whose names will conflict if they are placed in the same folder, they can be placed in different folders to avoid conflict. If the different implementations of (baz) are for different dialects: There can be separate folders for different dialects, so that conflicts are avoided. > * both implementations of (baz) ship with main.r6rs-lib which is a stub > to load implementation-specific code. In this case, the different implementations of (baz) are for the same dialect (because you said .r6rs-lib), so they are necessarily system-specific. They can be in the same folder and have different file names, e.g. /folder/baz/main.foo-r6rs-lib and /folder/baz/main.bar-r6rs-lib, or they can be in different folders with the same relative file names, e.g. /foo-folder/baz/main.r6rs-lib and /bar-folder/baz/main.r6rs-lib. -- : Derick ----------------------------------------------------------------