POV-Ray : Newsgroups : povray.off-topic : Games programmers : Re: Games programmers Server Time
10 Oct 2024 19:24:05 EDT (-0400)
  Re: Games programmers  
From: Gail
Date: 12 Sep 2008 13:55:21
Message: <48caad09@news.povray.org>
"Invisible" <voi### [at] devnull> wrote in message 
news:48ca7de8@news.povray.org...
>
> I spent about 3 days trying to figure out the syntax for making function 
> pointers work. After endless segfaults, I just gave up. It was too hard.

How often does a C/C++ programmer really need a function pointer? It's one 
of those advanced features that 99% of the time isn't needed at all.

> Which one is FALSE? Is that 0 or 1? I know it's one or the other, but I 
> can never ever remember which - and it's kind of important!

0. Any other value is true.

> What insane nutcase thought that making assignment an expression as a good 
> idea? Seriously, WTF? That's excellent. So if I say "if (x = 5)..." then 
> my program will silently fail to work correctly, and I'll probably spend 
> hours if not days trying to figure out why.

Most compilers will warn about that these days.
It's the same in Java, the same in C#

> Pointers in general usually result in disaster. I constantly get the 
> syntax wrong for pointer types, pointer dereferencing, and pointer 
> creation.

So don't use them. As Warp and others have shown, it's not necessary in any 
way to use pointers.


Post a reply to this message

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