Schlagwort-Archive: scope

Shadowing function parameters with local variables

Within this article I want to ask a very basic question which is important in nearly all programming languages: What if you have a function with a parameter x and inside the function you declare a local variable x. Will … Weiterlesen

Veröffentlicht unter C#, F#, Racket | Verschlagwortet mit , , , | 1 Kommentar

Lexical scope vs. dynamic scope

One of the basic concepts of all programming languages is scoping of variables. There existing two main concepts: lexical scope and dynamic scope.   Lexical scope The following example shows an F# function. The function foo uses the variable x … Weiterlesen

Veröffentlicht unter .NET, F# | Verschlagwortet mit , , , | Kommentar hinterlassen