unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: srfi-39 implementation
Date: Sun, 09 May 2004 10:48:04 +1000	[thread overview]
Message-ID: <87brky5su3.fsf@zip.com.au> (raw)
In-Reply-To: 20040506010251.GA3066@uab.es

Jose A Ortega Ruiz <jao@gnu.org> writes:
>
> I'd be glad to transfer the copyright to the FSF (if needed; it's
> barely 30 loc without comments)

Paperwork will be required if adopted.

> together with a little test program.

Tests are vital, you'll never know if it works if you don't exercise
all features.

>   #:use-module (ice-9 syncase)

I believe syncase is pretty big and not very fast.  define-macro or
similar is probably a better idea.  (And with enough quasiquote might
hide all helpers :).

> (define make-parameter
>   (case-lambda
>     ((val) (make-parameter/helper val (lambda (x) x)))
                                         ^^^^
`identity' in boot-9.

> (define get-fluid-tag (lambda () 'get-fluid)) ;; arbitrary unique (as per eq?) value

make-symbol perhaps.

> (define (make-parameter/helper val conv)

How does this stand in comparison to make-mutable-parameter in boot-9?
Similar but not quite the same?

>          ((eq? (car new-value) get-fluid-tag) value)
>          ((eq? (car new-value) get-conv-tag) conv)

Perhaps primitive-make-property or something to associate these,
instead of a function call.  (If I understand what it's trying to do.)

> (define (check a b a-val b-val)
>   (if (not (eqv? (a) a-val)) (error "failure -- a" (a) a-val))
>   (if (not (eqv? (b) b-val)) (error "failure -- b" (b) b-val)))

No, you should use the test-suite/lib.scm framework.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  parent reply	other threads:[~2004-05-09  0:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06  1:02 srfi-39 implementation Jose A Ortega Ruiz
2004-05-06  1:24 ` srfi-39 implementation -- Bug fix Jose A Ortega Ruiz
2004-08-15 20:43   ` Marius Vollmer
2004-05-09  0:48 ` Kevin Ryde [this message]
2004-05-09  1:09   ` srfi-39 implementation Paul Jarc
2004-05-10  0:21   ` Jose A. Ortega Ruiz
2004-05-13 21:10     ` Kevin Ryde
2004-05-13 23:23       ` Jose A. Ortega Ruiz
2004-07-19 20:17         ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87brky5su3.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).