haxe-repl icon indicating copy to clipboard operation
haxe-repl copied to clipboard

Why re-evaluate all of the generated std lib?

Open jdonaldson opened this issue 7 years ago • 2 comments

This library is pretty cool, I've been wanting to do something similar for python.

I see that you carefully execute only the latest expression in the buffer (including imports). Why do you re-evaluate all of the generated std lib as well? I must be missing something there.

jdonaldson avatar Jun 21 '18 23:06 jdonaldson

For now that's really a simplification. Pruning Std (and other imports in fact) needs more careful processing and diffing - possibly using a full AST parser.

Did you run into an issue with Std being re-executed?

elsassph avatar Jun 22 '18 06:06 elsassph

The only issue is that it seemed inefficient. The std lib could be generated/evaluated once per session, and omitted from subsequent incremental compilations. It's a small nit for a POC like this though.

jdonaldson avatar Jun 22 '18 17:06 jdonaldson