Principles of programming languages Maarit Harsu / Matti Rintala / Henri Hansen
TUT Pervasive Computing
1
Types (different views)
- Value collection
– values having the same properties can be collected together
- e.g. integers, floating points
– different representations for different types
- operations allowed for a type
- controlling the way how values are used
- Type construction
– more complicated types can be created from the primitive ones with a type constructor – value set and operations are seen as natural features for a type
- Type abstraction
– types as interfaces (modules, classes)
- implementation details hidden
– values can be accessed via predefined operations