Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
8 Cards in this Set
- Front
- Back
strongly typed language |
always detects type errors |
|
weakly typed language |
"anything can go" |
|
three views of types |
1. denotation: a type is a set of values 2. constructive: built-in or composite(made up of different parts) 3. abstraction-based: a type is a set of values and operations on them |
|
example of denotation view of type |
enum colorType {red, blue, green}; struct Object {int object; colorType color}; |
|
example of constructive view of type |
built-in: char, int, float, boolean composite: records/structs, arrays, classes, lists/sets |
|
type orthogonality |
different constructs can be combined in any combination i.e array of object of arbitrary types |
|
Two types of type equivalence |
Structural - same components put together in same way. (type1{char a, int b} == type2{char a, int b}!=type3{int b, char a}) Name or Declarative - have the "same" name c_temp = float; and f_temp = float; |
|
infer type i for (i + 1) if 1 is an int |
type(i) = int |