POV-Ray : Newsgroups : povray.off-topic : Games programmers : Re: Games programmers Server Time
10 Oct 2024 15:14:58 EDT (-0400)
  Re: Games programmers  
From: Warp
Date: 12 Sep 2008 16:55:17
Message: <48cad735@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> You know what? In Java, if you reference a null pointer, a little 
> message pops up that says "hey, you just dereferenced a null pointer". 
> And it even tells you where it happened. In C, your program just behaves 
> bizarely.

  Actually no. IIRC the C standard defines that accessing the null pointer
is illegal (and will usually cause a segmentation fault). If you are running
a proper debugger, it will tell you the exact line where the null pointer
was accessed.

> Ditto for EOF

  You mean reaching the end of the file is such a fatal error, that the
program must be terminated with an exception?

> array index out of bounds

  Unless you use a proper debugger.

> out of memory...

  Causes a null pointer access in C.

> (And you don't have to memorise whether 0 is true or false.

  I see how that's such a hard thing to memorize.

> Memory leaks? What memory leaks?

  Yeah. Java leaks memory constantly. In fact, *everything* is leaked.

> No dangling pointers here either.

  Except for the null references.

-- 
                                                          - Warp


Post a reply to this message

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