Getting started
James J. Besemer
jb at cascade-sys.com
Fri Sep 27 05:19:22 EDT 2002
Alex Martelli wrote:
>James J. Besemer wrote:
> ...
>
>
>>Types are otherwise pretty secure in C++ except the "cast" mechanism
>>"foils" the type system and thus allows type errors to occur.
>>
>>
>
>Actually, unions are at least as bad -- they're not often used
>for type-punning because casts are handier for that, but if you
>took cast aways, people would (ab-)use unions (just like they
>abuse EQUIVALENCE in Fortran for similar purposes).
>
You're right. I didn't mean to suggest that casts were the only thing
that could make C++ programs type unsafe. Should have inserted an
"e.g.," in the sentence, as it was intended only as an example.
Regards
--jb
--
James J. Besemer 503-280-0838 voice
2727 NE Skidmore St. 503-280-0375 fax
Portland, Oregon 97211-6557 mailto:jb at cascade-sys.com
http://cascade-sys.com
More information about the Python-list
mailing list