POV-Ray : Newsgroups : povray.off-topic : Mildly interesting article : Re: Mildly interesting article Server Time
14 Nov 2024 23:19:07 EST (-0500)
  Re: Mildly interesting article  
From: Warp
Date: 11 Nov 2007 18:00:33
Message: <47378990@news.povray.org>
nemesis <nam### [at] gmailcom> wrote:
> much of the problems he lists as plagues in the Unreal code have to do exactly
> with null pointer deferencing and out-of-bounds arrays, situations which have
> no parallel in Haskell...

  In C++ it's possible to create more abstract arrays and pointers which
are equally easy (if not even easier) to use than the native equivalents
and can be compiled to be equally fast.

  The advantage of this abstraction is that things like bound checks and
null pointer checks can be added to them.

  If the company has developed a robust library of abstract libraries and
then imposes strict rules on the coders (like "never do a 'int table[100];'
but always do a 'OurArray<100> table;'") then most of the problems can be
quickly caught in testing.

  The great thing is that during debugging and testing a version of the
library with full checks can be used, and when the final product has been
tested to death, then a version of it without the checks (for efficiency)
can be very easily compiled for distribution.

  So you get the best of both worlds: Null pointer, array boundary and
other types of checks at debugging and testing, full speed at release.

  The main obstable in achieving this are stubborn programmers who resist
change and who suffer from the C-hacker-syndrome.

-- 
                                                          - Warp


Post a reply to this message

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