Session 3
Saturday, 7 October 2017
Today is the third session of Programming Language. This session is the first groups presentations. Today's topic is about names, bindings, and scopes. Before the presentation starts, miss Yanfi gave us some questions and who can answer will get points. The purpose is to review last session's topic.
After reviewing, comes the group presentation. Group 1 and 2 will take turns present today's topic. After group 1 presentation, time isn't enough for group 2 presentation. So, group 2 presentation is delayed to the next session.
This session talked about Introduction, Names, Variables, The Concept of Binding and Scope.
Names in C-based language are case sensitive so there is disadvantage at reading it because names that look alike are different. Names in other language are case insensitive.
Variable is an abstraction of a memory cell. Variable can be characterized ad a sextuple of name, address, value, type, lifetime and scope.
Binding is an association between an entity and an attribute, such as between a variable and its type or value, or between an operation and a symbol. Binding time is the time at which a binding takes place. There are 5 possible binding times such as language design time, language implementation time, compile time, load time, and runtime.
There are static and dynamic variable. There are types of dynamic variable such as stack-dynamic, implicit and explicit-heap-dynamic. Every type of variable have their own advantages and disadvantages.
The scope of variable is the range of statements over which it is visible. if a variable declared in a unit, it is called local variable and if it's not declared there, it is called nonlocal variable. There are static, global and dynamic scope.
That's all about today session.
No comments:
Post a Comment