On 12 July 2012 13:12, nalaginrut <nalagin...@gmail.com> wrote: >> Personally I would think that having Guile guess by extension would be >> the, in most cases, most reliable. Otherwise there could be problems >> loading several files in different languages etc. >> > Yes, my vote is gussing by extension. But also provide an option --lang > to specify in case the extension name conflicts or other problems.
For most entry-points, there is no extension. When you install your program, you normally install it as /usr/bin/foo, rather than /usr/bin/foo.[ss|scm|py|js|whatever]. This is the motivation for guile-foo symlinks or --lang options. I favour the symlinks slightly, because not all languages are going to work with guile's extended mesh-wow system, and indirection via env already costs you one argument. For modules, specifically in languages where the module system has some abstraction above the filesystem, the mechanism that locates the module should be responsible for setting the module language. In other words, allow guile to defer to the language implementation to figure out the language of the loaded module in most situations. I think that otherwise, it should be up to the code using the module to supply the language with which it should be run. Extensions are one thing, but there is quite a bit that they can't handle, like rakefiles. And extensions don't allow you to specify a language level, either. -- William Leslie