|
![](/i/fill.gif) |
Thomas Willhalm <tho### [at] uni-konstanz de> wrote:
> No, it doesn't. It's just that the thing is named "object" instead of
> "void*". Furthermore, you are forced to use it, if you want to create
> generic container classes.
Firstly, what is so bad about having to inherit your classes from a
common base class?
Secondly, no-one forces you to do so. You can make a more rational design
by creating your own base class, which has common things to all classes.
> In C++, you can easily avoid void* in most
> if not all cases and still have static type checking.
I can't think of any way of avoiding void* other than using a common
base class, as in Java.
Of course you can make your container a template, but that doesn't allow
you to put objects of different types in that container. All the objects
must be of the same type.
> Thomas (who really misses templates/generics in Java)
I think they are planning to add template support to Java.
That's really funny when you think about how Java-freaks hate(d) templates.
--
#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
|
![](/i/fill.gif) |