(guile.info.gz) Programming Options
Info Catalog
(guile.info.gz) Testbed Example
(guile.info.gz) Programming Overview
(guile.info.gz) User Programming
17.4 A Choice of Programming Options
====================================
The preceding arguments and example point to a model of Guile
programming that is applicable in many cases. According to this model,
Guile programming involves a balance between C and Scheme programming,
with the aim being to extract the greatest possible Scheme level benefit
from the least amount of C level work.
The C level work required in this model usually consists of packaging
and exporting functions and application objects such that they can be
seen and manipulated on the Scheme level. To help with this, Guile's C
language interface includes utility features that aim to make this kind
of integration very easy for the application developer. These features
are documented later in this part of the manual: see REFFIXME.
This model, though, is really just one of a range of possible
programming options. If all of the functionality that you need is
available from Scheme, you could choose instead to write your whole
application in Scheme (or one of the other high level languages that
Guile supports through translation), and simply use Guile as an
interpreter for Scheme. (In the future, we hope that Guile will also be
able to compile Scheme code, so lessening the performance gap between C
and Scheme code.) Or, at the other end of the C-Scheme scale, you
could write the majority of your application in C, and only call out to
Guile occasionally for specific actions such as reading a configuration
file or executing a user-specified extension. The choices boil down to
two basic questions:
* Which parts of the application do you write in C, and which in
Scheme (or another high level translated language)?
* How do you design the interface between the C and Scheme parts of
your application?
These are of course design questions, and the right design for any
given application will always depend upon the particular requirements
that you are trying to meet. In the context of Guile, however, there
are some generally applicable considerations that can help you when
designing your answers.
Menu
* Available Functionality What functionality is already available?
* Basic Constraints Functional and performance constraints.
* Style Choices Your preferred programming style.
* Program Control What controls program execution?
Info Catalog
(guile.info.gz) Testbed Example
(guile.info.gz) Programming Overview
(guile.info.gz) User Programming
automatically generated byinfo2html