POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 08:24:53 EDT (-0400)
  Re: Object Oriented POV code  
From: Dan P
Date: 19 Feb 2004 12:53:58
Message: <4034f836$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:40348068@news.povray.org...
> Dan P <dan### [at] yahoocom> wrote:
> > new ColoredSphere
> > new ColoredSphere
>
> > new Color.White
>
>   Aaargh! No, no and no.
>
>   The fact that you must fill your code with the 'new' keyword in Java
does
> not mean it's a good thing.
>   Why force the user to do that? In all those cases the 'new' keyword is
> obsolete. It contributes nothing to the code.

I see what you're thinking of on this. I think it is there for clarity -- 
the compiler could always check to see what has been defined and decide to
either create a  new class there or use the reference. I believe (and this
is just a personal thing) that the readability of the code is just as
important as the execution of the code because, even if you write a program
in a vacuum without anybody else seeing it, /you/ still have to look at your
code later. Thing is, I see people write really hard-to-read code often and
I figure it could be: a. they don't want you to understand their code, b.
they think it will go magically faster if it is all scrunched together and
the variable names are shorter, c. they want to put as much on the screen as
they can, d. their fingers really hurt and typing causes physical distress,
e. they are so amazingly smart that they can instantly conceptualize the
code no matter how obfuscated it is, or f. they just have bad habits and
don't care. I'm guessing f. :-)


Post a reply to this message

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