3 ms·
> I realized early in the language that caching the eval results would make things really fast, and this caching ends up doing exactly what their lazy clones ac
by chriswarbo 5y ago
> I realized early in the language that caching the eval results would make things really fast, and this caching ends up doing exactly what their lazy clones achieves!
Sounds similar to the evaluation model of the Nix expression language (the pure functional programming language used by the Nix package manager). It caches evaluation results, which (a) avoids re-computing identical expressions, and (b) allows some infinite loops to be detected.
See https://www.researchgate.net/publication/222827743_Maximal_Laziness_An_Efficient_Interpretation_Technique_for_Purely_Functional_DSLs https://www.researchgate.net/publication/222827743_Maximal_L...
- afranchuk 5y agoThanks for bringing that up! I suspected that nix did that, but wasn't sure. This language is also a "task runner" (being used for build systems mainly), so it's not surprising that it behaves like nix does.