guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doc organization (Re: Around again, and docs lead role)


From: Neil Jerram
Subject: Re: Doc organization (Re: Around again, and docs lead role)
Date: 14 May 2003 00:01:36 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Bill" == Bill Schottstaedt <address@hidden> writes:

    Bill> I use scm_internal_stack_catch a lot (and can't see any need
    Bill> for Guile to remove it...) -- I pass closures/functions/user
    Bill> scheme code around in C, as well as providing a "listener"
    Bill> where anything might happen -- this would be clumsy to
    Bill> implement with some callback to scheme (and no easier to
    Bill> write in scheme than in C

Yes, I see.  I think one could express what this code does nicely in
Scheme, but the maturity of the Snd code and the build time support
for Ruby as well as Guile would make the exercise hard and
unrewarding.  In this context, my suggestion is a bit like saying
"well if I were you I wouldn't start from here."

I still contend, though, that if the Guile docs had been clearer, more
complete and more "canonical" when you started writing Snd (or perhaps
adding Guile to Snd), you might naturally have written more of Snd in
Scheme and therefore created a more extensible, maintainable and
generally hackable program.  What do you think?

    Bill> -- the tricky part is good error handling which Guile flubs
    Bill> miserably anyway).

It does?  Can you give more details here?

    Bill> Why try to force people to write scheme?  It seems to me
    Bill> that you're defeating the whole purpose of Guile just to
    Bill> simplify its documentation.

Because:

- I believe that is the point of Guile: higher level languages lower
  your "hacktivation energy", to use an old quote

- I believe (therefore) that people will be more productive that way

- I think that promoting a canonical "way of using Guile" will help me
  (or someone else) to complete Guile's documentation clearly, which I
  think will attract more developers to using and improving Guile

- I think that one of Guile's current problems is managing API changes
  between releases.  If we can reasonably shrink the official API, it
  makes the problem easier.

    Bill> Or to put it another way, if you don't have the C-level
    Bill> catch mechanism, you better not use scm_apply or anything
    Bill> related to it.  That leaves scm_num2int?

I don't follow this.  What is wrong with the following?

In C:
   scm_call_1 (scm_c_lookup ("my-func"), str);

In Scheme:
   (define (my-func str)
     (catch #t
       (lambda ()
         ... whatever ...)
       (lambda (key . args)
         ... handle errors ...)))

Thanks for your input.  (And please don't worry - everything I've said
is only suggestions - there are no plans to implement any of it yet
(if ever).)

        Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]