fizzy
fizzy copied to clipboard
Nice function execution API
I think using methods instead of free function may be nicer and will be more JavaScript-like.
In particular, for function execution we may have something like:
auto instance = instantiate();
auto fn = instance->fn("func1");
fn(0, 1.0);
instance->fn("func2")(1, 2);
instance->fn(0)(-0.0f); // Get function by index.
Why is it important to be "Javascript-like"?