[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running non-scheme scripts: some thoughts

From: William ML Leslie
Subject: Re: Running non-scheme scripts: some thoughts
Date: Thu, 12 Jul 2012 13:27:31 +1000

On 12 July 2012 13:12, nalaginrut <address@hidden> 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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]