SJS wrote:
Of course, doing tree-based algorithms in Java and C tends to be a
painful experience.
Um.... why?
And do you have an example?
Anything where the leaf and stem nodes are not identical and have no
predetermined depth. R-trees are a good example.
You wind up having lots of casting to Object or you wind up with some
nasty object inheritance hierarchies.
All I can think of is that in C (and Java), you have to define your
tree data structure, or you have to use a clunky generic predefined
one. It's not until I have to play with XML that I start feeling pain
with tree-structures in Java or C, but I suspect that's a library
misdesign problem.
Well, part of it is the fact that most XML libraries in C and Java
eventually flip themselves inside out in order to be iterative to avoid
stack faults. Suddenly, you can't access things in a recursive fashion
and have to start doing things like callbacks, iterators, etc.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg