POV-Ray : Newsgroups : povray.programming : Overloading identifiers : Re: Overloading identifiers Server Time
29 Jul 2024 00:25:53 EDT (-0400)
  Re: Overloading identifiers  
From: Jim Kress
Date: 29 Jan 1999 18:00:38
Message: <36b23d96.0@news.povray.org>
It's NOT more intuitive!  It's more confusing.  While some may like
'overloading' in C++ (where the heck did they get that name?).  It tends to
make the code and descriptions of the code (to some poor schmuck like me who
doesn't know how to code in C++) very confusing.

Ron's suggestion is more in line with 30 years of coding history and, to me
at least, much more clear.

--
Jim

Check out my web site http://www.kressworks.com/
It'll blow your mind (politically), stimulate your senses (artistically)
and provide scientific insights beyond compare!

Be sure to read the Warp maintained POV VFAQ:
http://iki.fi/warp/povVFAQ.html




Nieminen Mika wrote in message <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?-)
>
>: But in general, why is this more useful than just putting the
>: type information into the declaration?
>
>  It's more intuitive and it saves typing.
>  Even if overloadable identifiers were not good, overloadable macros
should
>be very handy.
>
>--
>main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
>*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*-
Warp. -*/


Post a reply to this message

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