Python from Wise Guy's Viewpoint
vanicat+invalid at labri.fr
Sat Oct 25 20:48:12 CEST 2003
gt5163b at prism.gatech.edu (Brian McNamara!) writes:
> prunesquallor at comcast.net once said:
>>Are they happy with something like this?
>>(defun black-hole (x)
>>(for non lispers, the funny #' is a namespace operator.
>> The black-hole function gobbles an argument and returns
>> the black-hole function.)
> Finally, an example that I don't think you can type in Haskell.
> You score a point for that. :)
> If we have a static type system which admits infinite types, then we
> can assign black-hole a type. So it's still typeable, just not in any
> common language I can name offhand. :)
$ ocaml -rectypes
Objective Caml version 3.07+2
# let rec f x = f;;
val f : 'b -> 'a as 'a = <fun>
By the way, I don't see how this function can be useful...
More information about the Python-list