Statically Typed and Dynamically Typed Languages

Here is a distinction we will see throughout the term. Languages can be divided into two large categories, those that are statically typed and those that are dynamically typed. A statically typed language requires a type declaration for every variable, and types are known at compile time. A dynamically typed language, on the other hand, types variables at run time based on their current value.

The distinction is important at this point because the two different forms of language treat message passing slightly different. Statically typed languages check the validity of message passing expressions at compile time, based on the types associated with the declarations of variables. Dynamically typed languages type variables at run time, and produce far fewer compile time error messages.

[audio] [real] Text to accompany slidexx, in Chapter 5 of An Introduction to Object-Oriented Programming