[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic variable binding
From: |
Sebastian Tennant |
Subject: |
Re: Dynamic variable binding |
Date: |
Sat, 27 Dec 2008 15:56:06 +0000 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
Quoth Keith Wright <address@hidden>:
>> From: Sebastian Tennant <address@hidden>
>>> Quoth Keith Wright <address@hidden>:
>>> I don't know what happens (in Guile), but I can tell
>>> you what _should_ happen. (In my humble opinion as
>>> a demi-god of semantics.)
>> I'm trying to wrap my head around symbols, variables
>> and names of variables. They seem to me to be three
>> different things.
> NB: I hate emoticons. The lack of a smiley face does
> not imply seriousness. This sort of thing has been
> puzzling a lot of people for a long time. In particular,
> I published a paper about it some 25 years ago, but have
> since decided that I don't know enough to be publishing.
> That's why it's fun to rave on the mailing list.
So... you're not a demi-god of semantics. Damn. I told all my friends
that you were.
> I almost understand something about symbols and variables, but the
> _name_ of a variable is not a technical term. I don't name variables,
> I just call them "this variable" or "that variable", or sometimes
> describe them as the "local variable |foo|".
>>> But you are asking the wrong question. Ask not what happens when a
>>> symbol is defined, ask what you can do to make the macro define an
>>> unquoted variable.
>> Answer: Pass it an unquoted variable.
>>
>> Is that the answer you expected?
> I am not sure I expected it, but it makes me feel good to know that it
> works.
Pleased to be of service.
>> My semantic point is that the first argument to definer (above) is
>> not a symbol and it's not a variable (an unbound variable error would
>> be thrown if it was), so in the context of the first agument to
>> define there is a third data type; 'variable name'.
>
> I am quite sure that it _is_ a variable, because the Scheme report, in
> the section on Variable Definitions, says:
>
> (define <variable> <expression>)
> ...define binds <variable> to a new location...
>
> you yourself say "pass it an unquoted variable".
I thought about this obvious contradiction but decided the pith
outweighed the loss.
> "The name of the song is called 'Haddocks' eyes'." "Oh, that's the
> name of the song, is it?" Alice said. "No, you don't understand,"
> the Knight said, looking a little vexed. "That's what the name is
> _called_."
I wonder what song it was to which Haddock's Eyes referred.
Sebastian