Add link to scripted function definition.

This commit is contained in:
Stephen Chung
2022-12-11 00:08:25 +08:00
parent 8bcb771281
commit 91f149270a
8 changed files with 217 additions and 61 deletions

View File

@@ -32,6 +32,12 @@ Speed improvements
Net features
------------
### First class functions (sort of)
* A function pointer created via a closure definition now links to the particular anonymous function itself.
* This avoids a potentially expensive function lookup when the function pointer is called, speeding up closures.
* It does _not_, however, allow the function pointer to be `export`ed as a constant from a script module because the closure may cross-call other functions defined in the module and the function pointer won't keep the fully encapsulated environment.
### `!in`
* A new operator `!in` is added which maps to `!(... in ...)`.