POV-Ray : Newsgroups : povray.off-topic : All your radix are belong to us! : Re: All your radix are belong to us! Server Time
29 Jul 2024 16:22:44 EDT (-0400)
  Re: All your radix are belong to us!  
From: Darren New
Date: 23 Jul 2011 13:13:04
Message: <4e2b0120$1@news.povray.org>
On 7/23/2011 7:59, Warp wrote:
>    If you access first and check bounds afterwards, that's kind of a bit
> late, don't you think?

In the first example, he reads, then checks, then writes, and it's not 
unreasonable to think that he's ensuring the write isn't out of bounds 
because the read is harmless.  (Yes, there are still architectures where 
*NULL does not trap.)

>    Well, if the code is accessing out of boundaries, there's a bug. If there's
> such a bug, the compiler is free to do whatever it likes. There's nothing
> surprising about that.

It is to a large number of people who work with safe languages. :-) Even 
more surprising to people who work with languages where having an index out 
of bounds doesn't even make sense, let alone be "a bug".

-- 
Darren New, San Diego CA, USA (PST)
   "Coding without comments is like
    driving without turn signals."


Post a reply to this message

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