:: Re: [DNG] Evince
Góra strony
Delete this message
Reply to this message
Autor: Rainer Weikusat
Data:  
Dla: dng
Temat: Re: [DNG] Evince
Didier Kryn <kryn@???> writes:
> Le 23/05/2016 23:29, Rainer Weikusat a écrit :
>> Rainer Weikusat <rweikusat@???> writes:
>>
>> [...]
>>
>>> Emacs is a somewhat old-fashioned/ traditional[*] Lisp implemenation
>> [*] It doesn't support lexical scoping.
>>
>
>     No idea what that means.


It means that any binding of some symbol is globally visible during the
dynamic lifetime of the scope which established it instead of being
restricted to code which is lexically contained in this scope.

Contrived example for that:

; function returning the current value of x + 1
;
(defun 1+x () (1+ x))
-> 1+x

; function which binds x to the value passed as argument and
; then invokes 1+x
;
(defun 1+v (v)
  (let
      ((x v))
    (1+x)))
-> 1+v


; set x to 15
;
(setq x 15)
-> 15

; call 1+v with argument 4
;
(1+v 4)
-> 5

; call 1+x in the global environment
;
(1+x)
-> 16

This can be executed via *scratch* buffer which does Lisp evaluation
upon C-j. I've marked the lines showing return vaues with ->.

'Lexical scoping' (which works the way 'local variables' usually work in
other languages) didn't exist in the 'Lisp world' until Scheme came to
be.