What is Expressiveness in a Computer Language [correction]

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Tue Jun 27 19:29:07 EDT 2006


David Hopwood wrote:
> Joe Marshall wrote:
> 
>>(defun blackhole (argument)
>>  (declare (ignore argument))
>>  #'blackhole)
> 
> This is typeable in any system with universally quantified types (including
> most practical systems with parametric polymorphism); it has type
> "forall a . a -> #'blackhole".

Ignore this answer; I misinterpreted the code.

I believe this example requires recursive types. It can also be expressed
in a gradual typing system, but possibly only using an unknown ('?') type.

ISTR that O'Caml at one point (before version 1.06) supported general
recursive types, although I don't know whether it would have supported
this particular example.

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



More information about the Python-list mailing list