POV-Ray : Newsgroups : povray.off-topic : Programming language discussion : Re: Programming language discussion Server Time
3 Sep 2024 23:23:19 EDT (-0400)
  Re: Programming language discussion  
From: Warp
Date: 28 Oct 2010 15:36:40
Message: <4cc9d0c7@news.povray.org>
Orchid XP v8 <voi### [at] devnull> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.