This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Translation for extension is a bad idea



[Han-Wen Nienhuys]
> Brent Fulgham:
> 
> >This is especially true where you have multiple users who each prefer
> >a different language for extension.  Linking to 'n' different
> >interpreter binaries, using 'n' different embed-API's and 'n'
> >different sets of interpreter quirks rapidly produces a massive
> >problem space for the application developer, and for debugging
> >problems with a user's scripts.
> 
> Again, I don't buy this. If I were to use GUILE, I'd have to use n
> different translators each with their own quirks. As a bonus, there
> are much less developers working on GUILE translators than on each of
> the Tcl/Python/Perl languages, which would result in less rapid
> bugfixes.
> 
> And I don't really believe that a developer will give thought to a "we
> want Tcl for extension" when there is already a functioning Scheme
> extension mechanism, especially if he/she is short on time. (Well, in
> any
> case, I wouldn't).

You make the classic hacker's mistake of underestimate the average
programmer's unwillingness to learn new things unless absolutely
necessary.  Most programmers aren't on your level.

> 
> [On the factual side: the only multi-language app that I know of,
> Gnumeric, has different plugins for each language and uses the
> standard interpreters for each.  The developers are actively pursuing
> interoperability using CORBA/Bonobo, and they are not using a unified
> language.
> 
> Perhaps the developers of gnumeric can give us a piece of their mind.]
> 

To me, the biggest arguments against translating other scripting languages
into guile are:

1) It's very difficult to get the semantics to match up exactly;

2) the result will almost certainly be less efficient that using the target
   language directly;

3) it may be easier for an application to support multiple interfaces to a
   variety of scripting languages anyway;

4) our time is probably better spent elsewhere e.g. in improving the core
   language.

However, the original goal of translators (to supply dialects of guile
which don't have the parenthesized-prefix syntax for those who consider it
distasteful) is, I believe, a good one.  Therefore, I'd rather see
something like CTAX (with a better name, please) be developed as the
"official infix syntax for guile" rather than lots of translators from tcl,
python, perl etc. to guile.  Too many people are scared away from lisp-like
languages due to the unfamiliar syntax; if we can ease their
transition/enlightenment, we will benefit.  The language Objective Caml
provides a very powerful preprocessor which can be used to modify the
entire surface syntax of the language; in principle, guile could have
something like this too.  However, this is a far cry from supporting (say)
perl semantics in ocaml or guile (*shudder*).

That said, if people want to work on translators, more power to them.

Mike


--------------------------------------------------------------
Mike Vanier	mvanier@bbb.caltech.edu
Department of Computation and Neural Systems, Caltech 216-76
GNU/Linux: We can't lose; we're on a mission from God.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]