[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dynamic vs. static typing




On Nov 18, 2003, at 8:16 AM, Ken Shan wrote:
>> How does "id" let you set the target of the generic proxy?
> You can set the target using "const".

Ok, let's make sure we understand one another. As I understand types, 
in the context of pure OOP languages, the idea is to prevent "this 
object does not respond to this message" errors. This is done by static 
typing - putting labels on all the variables, arguments and return 
values that indicate the list of methods to which the object referenced 
or returned can respond to and doing a compile time check to ensure 
that:
1. variables aren't sent messages which are not declared by their types
2. variables or arguments are not assigned to types which contain 
methods which their declared types do not contain

Does this sound reasonable so far?

-- Steve