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 22:27:18 EDT (-0400)
  Re: All your radix are belong to us!  
From: Darren New
Date: 1 Aug 2011 13:22:47
Message: <4e36e0e7$1@news.povray.org>
On 8/1/2011 9:30, Warp wrote:
>    Nobody claimed it is. It's just something you have to live with if you
> program in C (or its close variants).

Yes, I understand that.

>    But you *can't* expect something specific to happen if you dereference
> null (even if you do it "separately").

I know that too. I really do completely understand the problem. It's exactly 
why I'd say that maybe C or its close variants aren't good for a new user. 
I'm merely pointing out that "it isn't surprising if you already know it's 
going to happen" combined with "you should know it's going to happen because 
you need to understand the detailed rules of every single operation possible 
to write a program that silently doesn't do something good" combines to make 
"I only know a little bit" a bad choice.

> If you dereference null, *anything*
> can happen (including the following code doing something completely different
> than what you expect).

And it's not just dereferencing null. It's any of the undefined behaviors 
which can lead to the compiler doing very unintuitive things if you're not 
aware of the rule.

-- 
Darren New, San Diego CA, USA (PST)
   How come I never get only one kudo?


Post a reply to this message

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