Unit 2: Types
In this unit, you will learn about types, a method of enforcing levels of abstraction in programs. Data in programs come in many types: real number, integers, characters, lists, etc. A type error occurs when an operation is applied to an inappropriate data type. A type system consists of a set of types, and a set of programs to analyze types and type judgment. You will also learn about the basics of static typing, type checking and type inference.
Completing this unit should take you approximately 19 hours.
2.1: Principle of Typing
Read these slides, which will define typing, and explain why we need typing and how types compute. What is the difference between dynamic and static typing? Do you know any language with dynamic typing?
Read Chapter 6, which discusses type systems.
2.2: Type Checking
Read these slides, which discuss how to construct type systems for multiple languages and prove/show soundness of a type system.
Read these slides, which discuss typed programming languages.
Watch this lecture, which discusses type checking.
Unit 2 Assessment
Please take this assessment to check your understanding of the materials presented in this unit.
Notes:
- There is no minimum required score to pass this assessment, and your score on this assessment will not factor into your overall course grade.
- This assessment is designed to prepare you for the Final Exam that will determine your course grade. Upon submission of your assessment you will be provided with the correct answers and/or other feedback meant to help in your understanding of the topics being assessed.
- You may attempt this assessment as many times as needed, whenever you would like.