Runtime evaluation: Difference between revisions

Content added Content deleted
Line 387: Line 387:
There is also a three-argument version, <CODE>eval[expression, rethrows, hidesLocals]</CODE> where the <CODE>hidesLocal</CODE> argument is a boolean flag indicating if we want to hide local variables (that is, create a new context) before evaluation.
There is also a three-argument version, <CODE>eval[expression, rethrows, hidesLocals]</CODE> where the <CODE>hidesLocal</CODE> argument is a boolean flag indicating if we want to hide local variables (that is, create a new context) before evaluation.


Frink has an extensive security manager which allows the eval statement to prevent unsecure operations such as reading or writing a file or URL, creating new functions or classes, altering systemwide flags, evaluate arbitrary Java code, and so on. If code needs to evaluate unsecure statments, you can use the intentionally frighteningly-named <CODE>unsafeEval[str]</CODE>.
Frink has an extensive security manager which allows the eval statement to prevent unsecure operations such as reading or writing a file or URL, creating new functions or classes, altering systemwide flags, evaluate arbitrary Java code, and so on. If code needs to evaluate unsecure statments, you can use the intentionally frighteningly-named <CODE>unsafeEval[str]</CODE> (which may itself be disallowed in secure contexts.)


=={{header|Go}}==
=={{header|Go}}==