Next: Typed Lambda Calculus Up: Class notes 25 Previous: Class notes 25

Why typed languages?

Well, types are really important for proper coding of a program. Strong typing is a key to develop bug-free large sofwares. There are at least three important reasons as to why types are needed in a programming language.

1)
Explaination and Meaning : A strongly typed program is more readable than the one not strongly typed. Results have a certain well defined type and hence some meaning attached to them. Its easier to explain the behavior of a well-typed program.
2)
Checking and Error : Good type checking is a well proven part of software engineering. A strongly typed language complier picks up errors. There are many tools that are available for ckecking , type checkers and program verifiers.
3)
Complie Code efficiently : For example, we can layout the memory of a data structure, if we happen to know the type.

We'll differ from Gunter's account of types in given in chapter 2 (but see section 7.5 in Gunter). Gunter has some base type to start with, but in our class notes we keep things abstract. We put Type Variables such as A,B,C which denote some unknown types. Also Gunter uses explicit typing in chapter 2, that is abstractions include a type as in . We use implicit typing.


pavel@
Fri Nov 4 15:40:35 EST 1994