This is the mail archive of the guile@sourceware.cygnus.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: Some easy questions from beginer


Hello Sergey,

>>>>> "Sergey" == Sergey Dolin <dsa-ugur@chel.surnet.ru> writes:

    Sergey> 1. What does mean symbol ":" in the guile's
    Sergey> variable/function name?

The ":" is just one more character in a name as far as guile is
concerned.  Often it is used to make a name readable (ie ui:screen is
part of some package named ui), but that's just a naming convention
which has not special significance as far as scheme is concerned.  If
you don't like a ":" then pick a different character.  It's up to
you. 

    Sergey> 2. When to use "protect-from-gc"(i've seen it in
    Sergey> libguile/*.c)?

It's pretty rare to need scm_protect_object.  As long as the SCM value
for an object is on the stack it's automatically protected.  You will
need to protect the object if you take an SCM value and stick it into
a global variable since the GC doesn't know where all of the globals
live.  If you stick an SCM value into mallocated memory you will also
need to protect it.

All in all, it's pretty easy to avoid needing global variables and
mallocated memory for SCMs.

    Sergey> 3.While reaing docs, i've stucked on function what is not
    Sergey> defined in "libguile.h". Is where any flavours of guile
    Sergey> what can coused it?

Be warned... The docs tend to be out of date.  I'm not sure I
understand you question.  Which specific functions are you stuck on. 

Good luck on getting up guiles learning curve.  Its a little steep at
the beginning but once you get over the initial climb guile is quite
easy to use.  You might take a look at swig which makes building
interfaces between guile and other libraries quite easy.

Regards,

Clark

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