3 ms·
> All the transpiler has to do is invent a globally unique name for each function, for instance. I would expect nested functions to close over their context. S
by masklinn 12y ago
> All the transpiler has to do is invent a globally unique name for each function, for instance.
I would expect nested functions to close over their context. Still implementable in C of course (or ghc -fvia-c wouldn't work), but not as trivially.
- adrusi 12y agoProcedures can appear at the top level in a module as well as inside other scopes, in which case they are called nested procs. A nested proc can access local variables from its enclosing scope and if it does so it becomes a closure. From the manual: http://nim-lang.org/manual.html#closures http://nim-lang.org/manual.html#closures