Dimitris Vyzovitis wrote:
> Nathan Meyers wrote:
> 
> > But I'm always curious about "wacky people" who like to
> > use thousands of threads (or tons of memory or zillions of levels of
> > recursion, etc.). Is that approach fundamental to solving the problem
> > efficiently, or do you use it because it's convenient and/or cool?
> >
> 
> Sometimes the model involved is recursive/concurrent by definition, and a
> recursive/concurrent implementation is the cleanest way to implement it.
> What are we supposed to do in such cases? Perplex the situation badly in
> order to avoid using lots of threads?
> 
> There are cases you simply can't do so.

I certainly touched off a firestorm with my question :-). Probably made a few
enemies in the process, but I hope not. Since this has drifted pretty far
off-topic for Java/Linux, I think I'll keep quiet after this response.

There is rarely a single way to solve a problem, and reality dictates that it is
sometimes necessary to make concessions to the architectural limitations you're
working under. Java does a lovely job of abstracting out architectural
differences, but that isn't always consistent with creating a solution that
works or performs well in the real world.

Consider the humble act of traversing a binary tree. That lends itself naturally
to recursion. But you can also do it iteratively if you're willing to add a
couple more fields to each node. If your stack is small, that might make the
difference between working and not working. Crude, as they say, but effective.

Nathan Meyers
[EMAIL PROTECTED]

Reply via email to