I use DLR in a small part of a larger C # project, and IronPython is a language.
For some parts of the system, the user can enter a small script to customize the behavior for them. What I would like to do is to restrict them to using free pure functions with a side effect or in the form of a sandbox so that their function cannot touch anything outside.
In addition, the user can only enter the body of the function, the function title and the specification of the argument are automatically preliminarily delayed in the code before passing the DLR engine to Python, so the C # side of the system that calls it knows the arguments to pass and return. Users will only need to perform simple operations and tests based solely on the values โโpresented as arguments.
eg.
this is normal: return (a * 100) > b;
this is not normal: delete_file_system(); return (a * 100) > b; delete_file_system(); return (a * 100) > b;
How can this be achieved? Is there a better language or technology choice?
freddy smith
source share