guile-user
[Top][All Lists]
Advanced

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

Re: Benchmarks of guile-www against HB's Guile module.


From: Thien-Thi Nguyen
Subject: Re: Benchmarks of guile-www against HB's Guile module.
Date: Wed, 13 Feb 2002 14:29:06 -0800

   From: Alejandro Forero Cuervo <address@hidden>
   Date: Wed, 13 Feb 2002 11:54:39 -0500

   So the standard is that hb-related procedures should be given the
   name hb-XXXX and hb-related variables the name *hb-file*, right?

my comment was directed at variable names only.  the thinking is that
"globals are bad" (or at least mostly undesirable for their property of
changing local behavior from a distance), so it's good to make them
visually distinct as a warning.  lispish programs conventionally use
*VAR*.

   This idea has two improvements over my initial implementation: not
   only the user no longer has to pass the *hbfile* parameter explicitly
   but I like the idea of letting him use a symbol instead of a string
   to specify the name of his callback function.

if this appeals to you, you might consider restructuring the (guile)
interface so that programmers can write something like:

(use-module (hb registrar) (ice-9 common-list))

(define (my-proc-1 whatever args) ...)
(define (my-proc-2 whatever args) ...)
...

(hb-register-procs my-proc-1
                   my-proc-2)


making configuration thus evaluative (as opposed to declarative) can be
a pain to support, but has benefits for the programmer (in this example,
they can use whatever (ice-9 common-list) provides, in their procs).

on the other hand, if you follow this suggestion, my next one would be
to rewrite hb using libguile-provided data structures (e.g., lists), but
that sounds like a lot of work.  ;->

thi



reply via email to

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