Loopholes

Guy Harris guy%gorodish at Sun.COM
Mon Jan 12 09:11:28 AEST 1987


> This isn't surprising.  Generally speaking, the stronger the type checking,
> the more need there is for this kind of operator -- especially if you want
> to do systems-type programming with it.

In some cases there are things you can't do in C without such an operator.
For example, if you have a "register" variable of some type, and you want to
interpret its bits as a value of some other type, you can't use the

	*(something_else *)(&x)

trick.

The lack of such an operator in C might not be surprising; it is amusing,
though, that there are grungy low-level non-portable things that can be
expressed in a language with more strongly checked types than C's, but not
in C.



More information about the Comp.lang.c mailing list