Wednesday, 15 January 2014

Is there ever a good reason to use eval()? -


It seems that eval () is treated with the same abomination which is goto And from eval , I mean to execute the string as a code, as seen in PHP, Python, Javascript etc. Is there ever a situation where eval () is appropriate (except for Pearl)? And if not, why do so many languages ​​apply it?

Yes - when there is no other way, given the level of clarity and code appropriate Complete within the number.

This eliminates 99% of cases where eval is used on all boards and languages.


No comments:

Post a Comment