5 ms·
How fast is the compiler? In many cases a report can just be syntactic sugar for compiling and running an accumulating log of source code lines. It’s not really
by catlifeonmars 4y ago
How fast is the compiler? In many cases a report can just be syntactic sugar for compiling and running an accumulating log of source code lines. It’s not really important how it works under the hood as long as it’s mostly transparent to the user.
As a side effect, it might also be a good way to keep your compile times down.
- zesterer 4y agoFast enough for this approach to work for small examples. For longer examples, I'm less confident: I've yet to implement a proper module system (other than a slightly more principled version of C's #include) so this currently means compiling the entire standard library on every REPL line. Thankfully, the compiler can still handle this within about 100 milliseconds on my machine. Perhaps when I have a more rugged module system I can look into this more, thanks for the suggestion!
- substation13 4y agoWhat if one of those lines fires the missiles?
- darthrupert 4y agoThat's not even close to being adequate for the kinds of things good REPLs are good for.