sink
sink copied to clipboard
Add runtime test to see if a native function is defined
Should be able to write code like:
if isnative drawcircle
drawcircle 100, 100, 20
end
Not exactly sure how this should work syntactically though. If isnative foo
is parsed like normal, then foo
will run, so it would need to hack around that. But then isnative <expr>
wouldn't work -- which is probably fine..?
Then you couldn't do dynamic function checks, but that's probably fine.
Also, I'd have to look to see if validating a program ensures that all native functions exist... because that would be wrong if isnative
exists, since program code could contain native functions that are never executed.
This is now implemented on master, but the beta binaries don't have it... I will close the ticket once I get around to building a new beta