Bengt Richter <bokr at oz.net> wrote: > I like defining nested functions except for the fact that a definition is executable code > in itself, and will be re-executed each time the outer function or method is called. I'm > not sure how long MAKE_FUNCTION or MAKE_CLOSURE take to execute, but IWT it must mean allocating > and glueing together the dynamic elements necessary for a distinct function/closure instance, > and then disposing of them at some point on/after their going out of scope, vs. e.g. just locating > a sibling method. This doesn't need to be slow--it's up to the implementation to try to be as smart as possible. A compiler can do lambda-lifting to transform a program with nested functions to one without, so there really is nothing inherently slow about nested functions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4