Chris Smith <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> Rob Thorpe <[EMAIL PROTECTED]> wrote:
>> A language is latently typed if a value has a property - called it's
>> type - attached to it, and given it's type it can only represent
>> values defined by a certain class.
> 
> Now I define a class of values called "correct" values.  I define
> these to be those values for which my program will produce acceptable
> results.  Clearly there is a defined class of such values: (1) they
> are immediately defined by the program's specification for those lines
> of code that produce output; ...

> I'm not trying to poke holes in your definition for fun.  I am
> proposing that there is no fundamental distinction between the kinds
> of problems that are "type problems" and those that are not.

That sounds like a lot to demand of a type system. It almost sounds like 
it's supposed to test and debug the whole program. In general, defining the 
exact set of values for a given variable that generate acceptable output 
from your program will require detailed knowledge of the program and all 
its possible inputs. That goes beyond simple typing. It sounds more like 
contracts. Requiring an array index to be an integer is considered a typing 
problem because it can be checked based on only the variable itself, 
whereas checking whether it's in bounds requires knowledge about the array.

-- 
YAD
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to