Orchid XP v8 <voi### [at] dev null> wrote:
> Besides, normally just about any code that does stuff to a linked list
> ends up doing something like
> while (list != null)
> do stuff;
> list = next node;
> So there's a check in there anyway. All we're doing by using a union is
> making it a different check.
Ostensibly there could be other types of nodes in the list besides regular
nodes and end nodes. These could, for example, contain different types of
data. Any operation you do on the data would have to first check that the
node is of the correct type (if the node is a union).
--
- Warp
Post a reply to this message
|