What is Expressiveness in a Computer Language

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Sat Jun 24 11:13:02 EDT 2006


Rob Thorpe wrote:
> Andreas Rossberg wrote:
>>Rob Thorpe wrote:
>>
>>>Its easy to create a reasonable framework.
>>
>>Luca Cardelli has given the most convincing one in his seminal tutorial
>>"Type Systems", where he identifies "typed" and "safe" as two orthogonal
>>dimensions and gives the following matrix:
>>
>>           | typed | untyped
>>    -------+-------+----------
>>    safe   | ML    | Lisp
>>    unsafe | C     | Assembler
>>
>>Now, jargon "dynamically typed" is simply untyped safe, while "weakly
>>typed" is typed unsafe.
> 
> Consider a langauge something like BCPL or a fancy assembler, but with
> not quite a 1:1 mapping with machine langauge.
> 
> It differs in one key regard: it has a variable declaration command.
> This command allows the programmer to allocate a block of memory to a
> variable.  If the programmer attempts to index a variable outside the
> block of memory allocated to it an error will occur.  Similarly if the
> programmer attempts to copy a larger block into a smaller block an
> error would occur.
> 
> Such a language would be truly untyped and "safe", that is safe
> according to many peoples use of the word including, I think, yours.
> 
> But it differs from latently typed languages like python, perl or lisp.
> In such a language there is no information about the type the variable
> stores. The programmer cannot write code to test it, and so can't
> write functions that issue errors if given arguments of the wrong type.

So the hypothetical language, unlike Python, Perl and Lisp, is not
dynamically *tagged*.

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>



More information about the Python-list mailing list