What is Expressiveness in a Computer Language
Yet Another Dan
goofball at vapornet.com
Mon Jun 19 14:21:56 EDT 2006
Chris Smith <cdsmith at twu.net> wrote in
news:MPG.1f007f6a483b5e7d9896c6 at news.altopia.net:
> Rob Thorpe <robert.thorpe at antenova.com> 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
More information about the Python-list
mailing list