Greetings,
I'm working in a code base that uses alot of anonymous methods, where the anonymous methods are chaining other anonymus methods that call the same thing the first one calls.
main()
{
anonymous1();
}
anonymous1()
{
// call anonymous2
}
anonymous2()
{
//call anonymous3
}
anonymous3()
{
// Call anonymous1
}
thats the basic break down, sorry for the over simplification.
My concern is that one of the anonymous methods are causing problems chaining the calls like that. IMO it looks like it's just bad recursion that is going to cause a stackoverflow exception.
Thanks for your help in advance.
It'll all depend on how you implement logic.
Recursion by itself is not and should not be a problem.
One could argue the same about any file/folder algorithm that uses recursion. If it is well implemented, you have nothing to worry about.