DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) User Programming

Info Catalog (guile.info.gz) Programming Options (guile.info.gz) Programming Overview
 
 17.5 How About Application Users?
 =================================
 
 So far we have considered what Guile programming means for an
 application developer.  But what if you are instead _using_ an existing
 Guile-based application, and want to know what your options are for
 programming and extending this application?
 
    The answer to this question varies from one application to another,
 because the options available depend inevitably on whether the
 application developer has provided any hooks for you to hang your own
 code on and, if there are such hooks, what they allow you to do.(1)
 For example...
 
    * If the application permits you to load and execute any Guile code,
      the world is your oyster.  You can extend the application in any
      way that you choose.
 
    * A more cautious application might allow you to load and execute
      Guile code, but only in a "safe" environment, where the interface
      available is restricted by the application from the standard Guile
      API.
 
    * Or a really fearful application might not provide a hook to really
      execute user code at all, but just use Scheme syntax as a
      convenient way for users to specify application data or
      configuration options.
 
    In the last two cases, what you can do is, by definition, restricted
 by the application, and you should refer to the application's own
 manual to find out your options.
 
    The most well known example of the first case is Emacs, with its
 extension language Emacs Lisp: as well as being a text editor, Emacs
 supports the loading and execution of arbitrary Emacs Lisp code.  The
 result of such openness has been dramatic: Emacs now benefits from
 user-contributed Emacs Lisp libraries that extend the basic editing
 function to do everything from reading news to psychoanalysis and
 playing adventure games.  The only limitation is that extensions are
 restricted to the functionality provided by Emacs's built-in set of
 primitive operations.  For example, you can interact and display data by
 manipulating the contents of an Emacs buffer, but you can't pop-up and
 draw a window with a layout that is totally different to the Emacs
 standard.
 
    This situation with a Guile application that supports the loading of
 arbitrary user code is similar, except perhaps even more so, because
 Guile also supports the loading of extension libraries written in C.
 This last point enables user code to add new primitive operations to
 Guile, and so to bypass the limitation present in Emacs Lisp.
 
    At this point, the distinction between an application developer and
 an application user becomes rather blurred.  Instead of seeing yourself
 as a user extending an application, you could equally well say that you
 are developing a new application of your own using some of the primitive
 functionality provided by the original application.  As such, all the
 discussions of the preceding sections of this chapter are relevant to
 how you can proceed with developing your extension.
 
    ---------- Footnotes ----------
 
    (1) Of course, in the world of free software, you always have the
 freedom to modify the application's source code to your own
 requirements.  Here we are concerned with the extension options that the
 application has provided for without your needing to modify its source
 code.
 
Info Catalog (guile.info.gz) Programming Options (guile.info.gz) Programming Overview
automatically generated byinfo2html