View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Discussion 1 - Cooper Welch

SOURCE: An Introduction to Programming

Every programming language has what are called “types.” Types form the backbone of the structure of a programming language - all objects in any program, no matter how abstract, can be broken down into component types. Types can represent a wide range of primitive data forms…strings, characters, integers, etc. - they are the basic building blocks that all programming languages conform to. However, when it comes to how these types become implemented and accessed in different programming languages, one can begin to see where languages start to differ and how people’s programming becomes affected.

The first argument presented concerns static types as opposed to dynamic types. Statically typed languages such as ML and Eiffel cause variables to be absolutely declared as one of the primitive data forms. Dynamically typed languages such as Lisp and Python don’t necessarily require a definitive type declaration of variables. Both forms of typing are beneficial in their own ways. Statically typed languages allow for certain errors in programs to be detected earlier, due to the rigidity of what will and will not be allowed. Dynamically typed languages allow for more flexibility and compactness of code, and thus might be useful for prototyping a system.

The second argument presented concerns strong types as opposed to weak types. For strongly typed languages, at any point during a running program, the program is able to know what type a particular chunk of data is. For weakly typed languages, variables are “assumed” to be certain types at compile time, but those assumptions may not necessarily be correct. For example, with C (a weakly typed language), variables might point to different types of data, or even random areas of memory, thus causing the program confusion in understanding what type of object is being referred to.

Programming languages differ in how they combine static, dynamic, strong, and weak typing. People’s programming becomes affected in terms of abstraction of code, speed of coding, and level of understandability. Ultimately, typing becomes responsible for how many programming languages function.

I read Tom Filip’s article on memory allocation, garbage collection, and inheritance. The topics of his write-up further emphasize the relevance of different typing philosophies involved with the structure of programming languages. For example, Tom mentions that with C, it is possible (and often necessary) for the programmer to “precisely manipulate memory blocks, from creation to their destruction.” This would make perfect sense, since C is a weakly typed language. He also goes on to state that with Squeak and Java, “…the user does not have to worry about allocation and garbage collection.” This would also make perfect sense, because Squeak and Java are both strongly and dynamically typed languages.

Links to this Page