6 ms·
> Since Java is not a functional language and has sufficient expressive power to write iterations as... iterations, good programmer will just write a for loop a
by flavio81 9y ago
> Since Java is not a functional language and has sufficient expressive power to write iterations as... iterations, good programmer will just write a for loop and will not bother about a feature that is basically unnecessary in multi-paradigm language.
Ok, so you think recursion is unnecessary in a multi-paradigm language.
Which implies also that multi-paradigm languages shouldn't be really multi-paradigm languages... Java, by the way, is hardly a multi-paradigm language.
And you imply that the reason one uses recursion is because one can't "write iterations as ... iterations".
You should realize that recursion is used whenever expressing the problem in a recursive way would make the problem easier to program and/or clearer to express, etc. Not because of recursion being fancy or fashionable.
Recursion is a computer science technique, not a "Design Pattern".