Improve the background for choosing appropriate programming languages for certain classes of programming problems Be able in principle to program in an imperative (or procedural), an object-oriented, a functional, and a logical programming language Understand the significance of an implementation of a programming language in a compiler or interpreter Increase the ability to learn new programming languages Increase the capacity to express programming concepts and choose among alternative ways to express things Simulate useful features in languages that lack them Be able in principle to design a new programming language Make good use of debuggers and related tools
Variables or methods that have local scope (and for object-oriented programming, this includes instances of classes) are accessible only in the current block of code. There is a sort of "nested sets" model to the notion of scope. Beginning with global objects (see below), each contained block may access objects defined in a containing block; that is to say, in a code fragment in which a variable is defined and the program enters some kind of loop block, that loop sub-block does have access to that variable defined outside of the block, and it may, additionally, override it temporarily by declaring a variable of the same name in its own local scope (the scope of that loop block). See the example below. Local scope essentially refers to variables that are limited, as far as access is concerned, to the most current block of code, and not necessarily to any "outer" blocks that might also be counted in the nested model.