POV-Ray : Newsgroups : povray.programming : Overloading identifiers : Re: Overloading identifiers Server Time
29 Jul 2024 00:30:23 EDT (-0400)
  Re: Overloading identifiers  
From: Rudy Velthuis
Date: 28 Jan 1999 12:37:21
Message: <36b0a051.0@news.povray.org>
Nieminen Mika schrieb in Nachricht <36b09c35.0@news.povray.org>...
>Ron Parker <par### [at] my-dejanewscom> wrote:
>: #declare A=1;
>: #declare A=<1,2,3>;
>: #declare B=2;
>: #declare B=<4,5,6>;
>: #declare C=A+B;
>
>  In this case povray could issue an error message like "Ambiguous
operands".
>  Then perhaps you can typecast the operands like this:
>
>#declare C=(vector)A+(scalar)B;
>
>  Too complicated?-)

Yes!

Well, not for me and you, but propably for most POV-Ray users. Remember,
that POV has a scripting language which is complicated enough for most
people already. You and I know about typecasts and functions etc. Don't
forget that even #macros are just that, and not fully fledged functions. And
in fact #declares are very similar to C/C++ #defines.

Anyway I don't see the big advantage of overloading. I don't see the
advantage of overcomplicating the script language either. Not everyone who
can use POV should be able to program.

--
Rudy Velthuis


Post a reply to this message

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