-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reentrant Engine, Rust anonymous functions, in
expression, timestamps, bug fixes
#128
Conversation
in
expression, bug fixes
in
expression, bug fixesin
expression, bug fixes
Small question: is there a better name than "anonymous functions"? I always think of the lambda-like functions that rust has:
I interpret this as more like "exported functions", where a named function in Rhai gets a function pointer in Rust. (It might be useful for Rhai to support the syntax above, but that's a separate topic.) |
Well, I thought about the name also. However, This is more like a curryed function... And this is what Rust's documentation says about anonymous functions: |
in
expression, bug fixesin
expression, timestamps, bug fixes
This PR does the following:
call_fn
now has only one version and handles tuples of one/zerooptimize_ast
can now control the optimization levelin
expressionstimestamp
which is basicallystd::time::Instant
to do rudimentary timingno_stdlib
feature - useEngine::new_raw
to create rawEngine
Engine
is now re-entrantEngine
viacall_fn