[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: srfi-39 implementation
From: |
Kevin Ryde |
Subject: |
Re: srfi-39 implementation |
Date: |
Fri, 14 May 2004 07:10:41 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
"Jose A. Ortega Ruiz" <address@hidden> writes:
>
> Although you are right in that primitive-make-property & co. can be
> used, i think the case-based thing is slightly lighter and maybe even
> faster, since no hashtable creation/lookup is involved. Or, at any
> rate, the difference should be minimal,
Ok. Another possibility I guess (for both styles) would be a single
call or lookup giving back both fluid and converter. Doesn't quite
suit the way with-parameters* does its `map's though.
> (define-module (srfi srfi-39)
> #:export (make-parameter)
> #:export-syntax (parameterize)
>
> ;; procedure not in srfi-39.
> #:export (with-parameters*))
One #:export (with whatever comment) is enough I expect.
> (with-test-prefix
> "make-parameter"
In emacs
(put 'with-test-prefix 'scheme-indent-function 1)
noted in test-suite/lib.scm gives good indentation. I've also been
using
(put 'expect-fail 'scheme-indent-function 1)
(put 'pass-if 'scheme-indent-function 1)
(put 'pass-if-exception 'scheme-indent-function 2)
> (let ((conv (lambda (x) (if (x > 10) 10 x))))
> (pass-if "converter 1" (let ((a (make-parameter 32))) (eqv? (a) 32)))
A leftover from something? conv seems unused, and "(x > 10)" looks
pretty doubtful.
Otherwise looks good to me.