strong/weak typing and pointers

Michael Hobbs mike at hobbshouse.org
Thu Nov 4 16:31:06 EST 2004


Steven Bethard <steven.bethard at gmail.com> wrote:
> My point here is that I think in most code, even when people do a bunch of
> bit-twiddling, they have a single underlying structure in mind, and therefore
> you see them treat the bits as one of two things: (1) The sequence of bits, i.e.
> the untyped memory block, or (2) the intended structure.  IMHO, an example of
> taking advantage of weak-typing would be a case where you treat the bits as
> three different things: the sequence of bits, and two (mutually exclusive)
> intended structures.

One word: union




More information about the Python-list mailing list