4 ms·
Like anything, there should never be an absolute law against using a taboo language construct. Not to start another debate, but there are certainly very limited
by henning 19y ago
Like anything, there should never be an absolute law against using a taboo language construct. Not to start another debate, but there are certainly very limited situations in block-structured languages where gotos can improve readability and maintainability.
Similarly there are situations where eval() is probably appropriate. Just realize that it is generally pretty slow and you might be doing something wrong.
Try to change things so that you don't need it if you can. Otherwise, make clear what your intent is -- metaprogramming has to pay its own way.
Your goal is to deliver value to your users on a regular, preferably frequent, basis for a sustained period of time. This means making useful software which is maintainable. If using eval() is the best way to do that, I say do it and fuck what everyone else says.