| www.delorie.com/gnu/docs/guile/guile-tut_12.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In this manual, I usually jump into examples and explain them as you type in the code; here I will digress and ramble for a few paragraphs to set some concepts straight, and then let you type (or paste) in fun examples.
In 1995, I implemented a large program, Gnudl, using Guile quite extensively. In the design phase of Gnudl, I found I had to make a choice: should the fundamental data structures be C or Scheme data structures?
Guile allows C to see its data structures (scalar types, lists, vectors, strings ...). C also allows Guile to see its data structures. As a large program designer, you have to decide which of those capabilities to use. You have two main choices:
Mixing the two approaches seems unwise: the overall layout would be confusing. But who knows? There might be problems that are best solved by a hybrid approach. Please let me know if you think of such a problem.
If you use the former approach, we will say that the master world is Scheme, and the C routines serve Scheme and access Scheme data structures. In the latter case, the master world is C, and Scheme routines serve the C code and access C data structures.
In both approaches the libguile.a library is the same, but a
predominantly different set of routines will be used. When we go
through examples of libguile use, we will point out which is the master
world in order to clarify these two approaches.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |