|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
> if
> you depend on dynamic_cast heavily, you probably have some serious problem
> understanding C++.
Actually it's a symptom of bad OO design (unless you are using
dynamic_cast for something else than downcasting...).
The only cast which is "legit" is static_cast.
dynamic_cast is, how would I call it, "half-legit". It's safe and OO-like,
but if you need to use it, there's usually something wrong with your whole
design (not always, though, but usually).
The other two casts are very "illegit". They are very unsafe and only
needed for hacking things. (They still can be sometimes useful, though,
even though it's usually "dirty" code :P )
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
|