Monday, June 25, 2007

OO Typing

What is typing? Other than being a fundamental part of OO methods, it feels quite badly understood. I have two intentions here: to analyse the existing definitions and to define my interpretation.

Typing can be static, dynamic, strong or weak..

Ok, this was as far as I got.. I started in June and it's now October..

I don't think this is a lack of understanding on my part - simply that typing is so very fundamental to human thought. This basic-ness means we are trying to grasp the very core of human thought. Take one well oiled eel!..

A type is a pattern (by human standards). This is the nugget which links humans to typing in computing. Strong typing is boldly saying that one particular thesis is correct. It is a strong limitation of the field of possibilities, which is not a necessarily negative thing.

On the positive side there are a number of pre-judgements we can make (or a compiler might make) about some code. This can lead to efficiencies in code production and execution. However it generally tightly binds pieces of code together.

On the negative side, it strongly limits the ability of a piece of code to react in unfamiliar environments. This is the same as saying, "it generally tightly binds pieces of code together".

The reason I prefer stronger typing is that a piece of code can know what it is dealing with. The execution environment can know quickly if a call is incompatible or some coercion is necessary. Hmm, I need more thought because coding for the silicon is letting the tail wag the dog (these days).

No comments: