[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run-with-timer does not display message
From: |
Emanuel Berg |
Subject: |
Re: run-with-timer does not display message |
Date: |
Sun, 20 Jul 2014 21:37:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Sebastian Wiesner <swiesner@lunaryorn.com> writes:
>> 2. Interestingly, what I can see, my method, with
>> backticks and commas, isn't that "lexical" - because
>> then, there, the actual values are inserted?
>
> Note quite. The backquote is “static” in that it
> captures the *value* of the variable at the time the
> backquote is evaluated. “Lexical” binding captures
> the *variable itself*.
Yes, the backtick-comma is to downright hard-code it,
although it is code, and not a human, who do the
hard-coding...
> This makes a difference if the variable is changed
> after capturing. Considering the following example
> ...
>
> As you can see, changing "i" *after* creating the
> functions only affects the closure created by lexical
> binding. The function created by the backquote is
> left untouched.
Yes, that is clear, but this example shows (to me) the
difference between using hard-coded values and using
variables (in general).
That example looks all-fine to me. Are you saying, with
dynamic scope, the `i' in the lambda wouldn't have been
affected by the `setq'? But to me, your example is the
way it should be, natural... Why then, would you want
to use dynamic scope, and why is it the default?
--
underground experts united
- RE: run-with-timer does not display message, (continued)
- Re: run-with-timer does not display message, Sebastian Wiesner, 2014/07/20
- Re: run-with-timer does not display message, Stefan Monnier, 2014/07/21
- Message not available
- Re: run-with-timer does not display message, Emanuel Berg, 2014/07/20
- Re: run-with-timer does not display message, Stefan Monnier, 2014/07/21
- Message not available
- Re: run-with-timer does not display message, Emanuel Berg, 2014/07/21
- Re: run-with-timer does not display message, Stefan Monnier, 2014/07/24
- Message not available
- Re: run-with-timer does not display message,
Emanuel Berg <=
- RE: run-with-timer does not display message, Drew Adams, 2014/07/20
- Message not available
- dynamic and lexical scope, attempted summary with example (was: Re: run-with-timer does not display message), Emanuel Berg, 2014/07/20
- Re: dynamic and lexical scope, attempted summary with example, Thien-Thi Nguyen, 2014/07/21
- Re: dynamic and lexical scope, attempted summary with example, Thorsten Jolitz, 2014/07/21
- Message not available
- Re: dynamic and lexical scope, attempted summary with example, Emanuel Berg, 2014/07/21
- Re: dynamic and lexical scope, attempted summary with example, Michael Heerdegen, 2014/07/21
- Message not available
- Re: dynamic and lexical scope, attempted summary with example, Emanuel Berg, 2014/07/21
- Re: dynamic and lexical scope, attempted summary with example, Thien-Thi Nguyen, 2014/07/21
- Message not available
- Re: dynamic and lexical scope, attempted summary with example, Emanuel Berg, 2014/07/21
- Message not available
- Re: dynamic and lexical scope, attempted summary with example, Emanuel Berg, 2014/07/21