|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote in message
news:40363a68@news.povray.org...
> Dan P <dan### [at] yahoo com> wrote:
> > 32 comparisons for /one lookup/. Multiply that by, say, 100,000 lookups
for
> > fur.
>
> Using 'new' will not help. There will still be 100000 lookups in a loop
> regardless of whether there's a 'new' or not.
>
> The whole point in this is whether 'new' is useful or not. It isn't.
>
> Besides, there's no need to initialize an instance with the = operator.
> You don't have to do that in C++ so why would you need to do it in this
> scripting language?
> You can simply say:
>
> Color myColor(.1, .2, .3);
For the initial instance, sure; that's why C++ didn't both putting a new
there. But, what about assigning myColor again? Are you saying just do
another Color myColor(.1, .2, .3)? I'd find that just confusing. But, that's
me.
> (Instead of "Color myColor = Color(.1, .2, .3);")
>
> No need for 'new', and there's no ambiguity.
>
> > > There's a reason why in Java everything is not an instance of a
class.
>
> > I think everything should have been.
>
> Really? Then good luck trying to write things like "a = b+c;" in Java...
Smalltalk does that nicely... I don't see the problem.
One of the disconnects here is that I keep thinking in terms of a compiled
language, not a scripting language. It would be nice if we could compile
parts of our scenes into objects. But, I fear I'm opening a Pandora's box
even suggesting such a thing. It would make for interesting conversation, I
think (but most likely, just flames).
Post a reply to this message
|
![](/i/fill.gif) |