Wandering around these forums I have found various posts regarding use of Eval being bad. But the only issues with its use, mentioned, that I could find were
- It compiles the code, so is slow.
- When called multiple times, it leaks memory.
So I was thinking, if there is a method "RunMyApp()" that handles all the application execution workflow, and application's "Main()" is like
And I change the "Main()" to
Do the both points mentioned earlier about using Eval being the bad practice still hold? As ideally if there is no error in the call to "RunMyApp()"
- The code will only be compiled once.
- Eval will be called once so no memory leaks.
Although I will call eval again if the "RunMyApp()" encountered some error but that will be rare, so, memory leaks or compilation times still not be an issue. Basically what I want to do is keep my application running even if there is some one time error.
Also, are there any other issues other than the mentioned two?