[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New read/eval Scheme syntax inconsistent in handling existing code
From: |
David Kastrup |
Subject: |
Re: New read/eval Scheme syntax inconsistent in handling existing code |
Date: |
Mon, 05 Dec 2011 01:06:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
Valentin Villenave <address@hidden> writes:
> On Sun, Dec 4, 2011 at 5:06 PM, David Kastrup <address@hidden> wrote:
>> `(module-define! (current-module) (string->symbol ,token)
>
> Wow, interesting. I had seen such things in Nicolas' code (and in
> LilyPond codebase), but couldn't understand what it was for.
>
>> Using module-define! beats primitive-eval. If you want to know where it
>> is documented: it isn't.
>
> Indeed. I found an entry for module-use! but not module-define!.
>
>> But if you run a Guile program using
>> symbol-set! (which at one time was documented), it tells you that this
>> is deprecated and you should be using the module system instead. And if
>> you try enough different commands with "module" in them on the Guile
>> command line...
>
> There are a lot. (most of which seem to be undocumented so far).
>
>> I just asked on the Guile developer list whether this is somebody's idea
>> of a joke. And I thought Lilypond documentation was bad.
>
> Well, it depends whether you're referring to developer-oriented
> documentation or user-oriented. In the latter case, things have
> greatly improved (and were'nt that bad to begin with).
A function (rather than a macro not evaluating the first argument) for
setting a symbol is not what I call "developer-oriented".
That's totally basic functionality. In C, you just call scm_define and
that's it. But in Scheme, define is a macro that does not evaluate its
first argument. I don't know whether module-define! is actually the
most straightforward replacement. But it beats having nothing.
> Have you had a chance to have a look at the patch I suggested? Or
> should I send it to -devel, or upload it to rietveld (I hope there's
> no need to, for just a couple of regtests)?
Not yet.
--
David Kastrup
- Re: New read/eval Scheme syntax inconsistent in handling existing code, (continued)
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, Valentin Villenave, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, Valentin Villenave, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, David Kastrup, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code, Valentin Villenave, 2011/12/04
- Re: New read/eval Scheme syntax inconsistent in handling existing code,
David Kastrup <=