5 ms·
functions are the part you compile, everything else is just runtime data
by snek 7y ago
functions are the part you compile, everything else is just runtime data
- tom_mellior 7y agoThe question was why one would want to start compiling a function before all of its code is available.
- Groxx 7y agoPurely guessing, but: gigantic generated funcs are A Thing™, and pretty often I'd expect that you don't even need to know the full contents of a func to being executing it. Some structures would require it, sure, but not all. You could treat it as speculative execution up to the point where you can't, and then you just wait and continue-or-error when you know more.
- nonsince 7y agoAuthor here: you got here before me but this is precisely the right answer, although it’s more about not needing the full contents to start _compiling_, rather than executing necessarily. Supporting streaming execution parallel to compilation is absolutely possible, but a tougher challenge that isn’t necessarily for our purposes.