This is the mail archive of the 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

May be I should refine my points a little more. An extension language
can have various forms, and an application can use an interpreter in
different ways.

For applictaion design, one extreme is that the application has an
tight, well-defined external interface. For such an application, it is
rather easy to embed an interpreter. One only needs to write glue code
for the interpreter handle the external interfaces.  Using multiple
languages is best done by linking in (multiple) embedded interpreters
or even by writing IDL files and using CORBA for external interfaces.
(If you do that, you don't need other glue code, right?)

The opposite extreme is an application where language and its data
model permeates the entire program: for example, in Emacs (Correct me
if I'm wrong) almost everything is an elisp object, and the C-code
only deals with actions that interface with the system or need to be
very fast.

It is conceivable to use different languages for programming it, but
since the program is glued together using one language (elisp), a
different extension language will have to be very lispish, or be
burdened with lots of lots of conversion overhead.

On the extension side, you have at one extreme a configuration format
(a la .doomrc), and at the other extreme a full-blown programming
language used to implement large parts of the application (emacs,

I think it is evident that for the latter, it would be impractical to
use multiple languages (again due to semantical issues and conversion
overhead), except for some flavor of `infix scheme'. For the former,
it would be useful to use translators, so you don't force Scheme onto
unsuspecting users. Moreover, by syntactical bondage (eg, a
BNFgrammar) one can reduce the potential for mistakes in configuring

Summarising this and some previous posts:

* it would be nice if GUILE had some facilities for generating the
  syntactic sugar in configuration languages, or simply put: yacc &
  lex for GUILE

* there is consensus that Scheme is scary due to prefix notation. This
  suggest that there should be some infix dialect of Scheme.

  (would Dylan be an appropriate language for this, IIRC it was a
  derivative of LISP?)


Han-Wen Nienhuys   |    | http://www.cs.uu/~hanwen/

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