-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

bertrand greslier wrote:

> "completely" is wrong, my example is not a rule and not for all case
> but you can't say it is completly wrong, it is an example nothingelse.
> And replace inheritance with aggregation is a part of the solution,
> add an interface to represent B methods is also another part but in my
> example class A & B have just one attribut and zero methods.
> This example write in 5second in not here to prove my level of C++ and I
> have nothing to prove.

Well, the problem you will have is that this will have to be done ad-hoc,
case-by-case since there is no generic solution unless you transform the
hierarchy to use interfaces somehow. How do you want to manage that? Granted,
you can probably find a solution for every case I can cook up, but can you
imagine the amount of work required to handle the entire OSG codebase in this 
way?

> And for this example, if your class D inherit from the C, it must access to
> the y attribut of B class with the b instance of C.
> If you change my example, it is not my example it is your example, be aware
> of this.

OK, you are picking out a special case. Fine, point taken.

> I have try to say that porting C to java is more difficult to maintain
> after
> the parsing
> for a java devloppoer because you can't generate an orientied object code.

Hmm? Why should be the C code (procedural code) be rewritten as object-oriented
code? Not everything has to be object oriented, even in Java. Just wrap it into
a class method. That is, I am *not* advocating this as a good design practice
but this is perfectly possible and you have fewer issues to deal with than with
C++ (no inheritance, no templates, straight procedural code). I have seen this
done and it was working, however the maintainability and usability of that code
was another matter (essentially writing C in Java ...).

> Please say give me a better exemple with... instead of this.  Because it is
> difficult very to remain zen for me.

I am not interested in a pissing contest. My point was not to prove that you do
not know C++ or Java but to point out issues you will have to deal with if you
decide to undertake your goal. By all means, if you have a LOT of time and money
to spare, go on and do it. Plenty of people will appreciate your efforts.
However, in my opinion, it is not worth the effort considering the complexity of
the task and the potential benefits to be gained.

Regards,

Jan

- --

Jan Ciger
GPG public key: http://www.keyserver.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFFfzqOn11XseNj94gRAt0CAJsFIg5v1GAQgFFvZFTgFubJWU5MIQCfR+s2
xtxqejofb6IGnucqArjU1MQ=
=SVYy
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to