{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

names - COP4020 Programming Languages Names Scopes and...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
COP4020 Spring 2011 2 02/20/12 Overview Abstractions and names Binding time Object and binding lifetime
Background image of page 2
COP4020 Spring 2011 3 02/20/12 Name High level languages provide abstraction relative to the assembly languages Abstraction: high level language features separate from details of computer architecture (machine independence). A name is a mnemonic character string used to represent something else. Names are essential in high-level languages for supporting abstraction. Names enable programmers to refer to variables, constants, operations, and types instead of low level concepts such as memory address.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
COP4020 Spring 2011 4 02/20/12 Name and abstraction Names enable control abstractions and data abstractions in high level languages Control abstraction: Subroutines (procedures and functions) allow programmers to focus on manageable subset of program text, subroutine interface hides implementation details Control flow constructs (if-then, while, for, return) hide low-level machine ops Data abstraction: Object-oriented classes hide data representation details behind a set of operations Enhances a level of machine-independence
Background image of page 4
Name related issues Name: a mnemonic character string used to represent something else Related issues: Binding time: A binding is an association between a name and an entity. When is a name bound to the object it represents? Some binding is done at language design time (design decision).
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}