Some important factors from "Concepts of Programming Languages (global edition) 11ed. - Robert W. Sebesta"

:Chapter 5

 

6 attributes of variables: name, address, value, type, lifetime, and scope.

 

Aliasing(3)

-C and C++ is with their union types

-when "call by reference," ==> actual/formal parameter have the same value

-two pointer variables have the same value

 

static type binding VS dynamic type binding

(cf) disadvantage of dynamic type binding: type finding check X, high cost)

 

storage bindings and lifetime

-static variables: global(non-local) variable / “static” local variable

-stack-dynamic variable: local variable

-explicit heap-dynamic variable

 

⬥purpose of functions: reuse(with modifications), process abstraction, information hiding

 

static scope: functions are allowed nesting(eg.ALGOL60)

  However, C-based languages do not allow nested subprograms.

 

referencing environment

-nesting O: local, global, non-local

-nesting X: local, global

 

Named constants: useful aids to readability and program reliability

 

+ Recent posts