3 ms·
IIRC in a talk the author said that it just generated a function with a made-up unique name, like an internal def in another function.
by gkya 9y ago
IIRC in a talk the author said that it just generated a function with a made-up unique name, like an internal def in another function.
- serhei 9y agoThat's pretty similar to how languages like Scala with higher-order features translate down to the JVM bytecode (which is subject to certain restrictions).
- kazinator 9y agoIn general, if some target language entity exists in a named form only, then the corresponding anonymity of those entities in the source language must be simulated via gensyms. For instance, the branch targets in a while loop are anonymous, right? But in the target language, you must have a named label for the instruction. Solution: machine-generated label.