LANGREITER.COM plain, simple
      START     INDEX
 
lex-vs-dyn-bindingVisualize Context (requires Java Plug-in)
CREATED BY chris • LAST EDITED BY chris 7686 days AGO
(define x 1)
(define (f x) (g 2))
(define (g y) (+ x y))
(f 5)
With static (lexical) binding, that function application results in 3 (as the 'x binding in the parameter list of 'f is valid only in the body of the function), whereas with dynamic binding it results in 7 (as the 'x binding is overwritten during the call to 'f and only restored to its original value afterwards). Static binding generally makes programs easier to understand, as the binding of each symbol can be determined by looking at the source text (this strong connection to which is the reason for the other name of the concept, lexical binding).

Example from the MIT Scheme Reference.


  SEARCH

GET YOUR MOVE ON

  ALMOST ALL ABOUT YOU
So log in, fella — or finally get your langreiter.com account. You always wanted one.
Nearby in the temporal dimension:
Nobody.
... and 26 of the anonymous kind.
Click on Join us in the chatterbox dimension! for a moderate dose of lcom-talk. This will probably not work in Lynx and other browser exotica.


BACKLINKS
none

RECENT EDITS (MORE)
  films-seen
  Blood Stone
  y!kes
  wet towel
  B Studio
  Pilcrow News
  Nastassja Kinski
  2011-10-06-steve
  2011-10-06
  comment-2011-08-04-1

POWERED BY
Special Entanglement Forces provided by Vanilla

&c.
GeoURL RSS 0.92

FRIENDLY SHOPS
Uncut Games bei Gameware

OFFEN!
Offenlegung gem. §25 MedienG:
Christian Langreiter, Langkampfen
See also: Privacy policy.



 
EDIT