In order to brush up on some concepts I haven’t used since school I am going to go through the exam and refresh my understanding of the theory and concepts I was exposed to during school.
- What is a type? Wikipedia tells me about data types. The type is an attribute of data that tells me and the computer something about it like what operations can be performed on it and what values it can take. There are several classes of types: Abstract (ADT), Algebraic, Composite, Function, Machine, Pointer, Reference and Primitive. The answer I remember giving resembles more along the lines of the general overview in the article. I talked about ints, strings, boolean and floating points as the basic building blocks of a language. The idea that a data type is a constraint placed on the interpretation of data was lost on me during the exam. I think that means, in general for any language, the type system helps the programmer organize the inforamtion that needs to pass through the system they are building while at the same time the type system gives the compiler or interpreter the ability to check for logical correctness in the expressed algorithms.