Runtime evaluation: Difference between revisions
Content added Content deleted
(→{{header|Common Lisp}}: Add Déjà Vu example) |
(added zkl) |
||
Line 1,049: | Line 1,049: | ||
TODO: Is there a way to execute statements as well as evaluate expressions? [[Category:TI-89 BASIC examples needing attention]] |
TODO: Is there a way to execute statements as well as evaluate expressions? [[Category:TI-89 BASIC examples needing attention]] |
||
=={{header|zkl}}== |
|||
In zkl, the compiler is part of the language and compiling a chunk of code returns an executable (which how the REPL works), so <lang zkl>Compiler.Compiler.compileText( |
|||
"fcn f(text){text.len()}").f("foobar") |
|||
//-->6</lang> |
|||
All language constructs are allowed, the only sand boxing is the new code can only touch global resources or items explicitly passed in ("foobar" in the example). |
|||
{{Omit From|Ada}} |
{{Omit From|Ada}} |