450 exam 1 Flashcards
(112 cards)
reasons for studying this course
- increased ability to express ideas
- improved bg for choosing appropriate languages
- increased ability to learn new languages
- better understanding of significance of implementation
- better use of languages that are already known
- overall advancement of computing
four properties of programming languages
syntax, names, types, semantics
syntax
a precise description of a language’s grammatically correct programs
names
various kinds of entities in a program have names (e.g., variables, functions, parameters, classes, objects, etc.)
type
a collection of values and a collection of operations on those values
semantics
the meaning of a program
major programming domains
scientific, business, systems programming, AI, web software
language evaluation criteria (main)
simplicity and readability, orthogonality, clarity about binding, reliability, abstraction, support, cost
language evaluation criteria (other)
writability, portability, generality, well-definedness
simplicity and readability
small instruction set, simple syntax, ease of learning/programming
orthogonality
a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures; every combination is legal and meaningful
a lack of orthogonality leads to
exceptions to the rules of the language (and fewer exception rules = conceptual simplicity)
binding
the association between a variable and a property of that variable (e.g., a variable and its type or value)
early binding
takes place at compile time
late binding
takes place at run time
reliability
program behavior is the same under all conditions
with reliability, errors are ? and memory leaks are ?
detected and properly trapped; prevented
data abstraction
programmer-defined classes/types, class libraries
procedural abstraction
programmer-defined functions, standard function libraries
support
accessible (public domain) compilers/interpreters/IDEs, good texts and tutorials, wide community of users
cost
training programmers to use the language, writing/executing programs, maintaining programs (can be 2-4x as much as developing), reliability (poor reliability leads to high costs)
writabilty
how easily a language can be used to create programs
portability
the ease with which programs can be moved from one implementation to another
generality
the applicability to a wide range of applications