strong/weak typing and pointers

Steven Bethard steven.bethard at gmail.com
Tue Nov 2 23:34:06 CET 2004


Christophe Cavalaria <chris.cavalaria <at> free.fr> writes:
>
> If by ML you thing of OCaml you should try again. OCaml isn't type safe
> because of a few modules of the standard library. The marshaling module
> comes to mind. Using it you can "typecast" a pointer to an integer as a
> pointer to a string and segfault in the process because the unmarshal
> function trusts the caller to cast the result in the good type.

Thanks, I knew I'd read something like that somewhere.  Totally surprised me too
'cause I figured that, of all people, ML folks would be the most afraid of a
module like this. =)

Steve




More information about the Python-list mailing list