POV-Ray : Newsgroups : povray.off-topic : Programming language discussion : Re: Programming language discussion Server Time
4 Sep 2024 01:20:27 EDT (-0400)
  Re: Programming language discussion  
From: Warp
Date: 28 Oct 2010 13:41:26
Message: <4cc9b5c6@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> >   What would the harm be if eg. list nodes were structs instead?

> Since "null" is a union in Haskell to (i.e., it either has data in it or it 
> has no data in it), this wouldn't really save you anything.

  It saves checking the node type for each single operation you do to any
node in the list. It the node is a struct, its contents are fixed and thus
you don't have to check anything.

-- 
                                                          - Warp


Post a reply to this message

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