4 ms·
It sounds like you're asking these questions because you're stuck inside the scripting language box. There's a much greater range of choice open to you than Pe
by mnemonicsloth 18y ago
It sounds like you're asking these questions because you're stuck inside the scripting language box. There's a much greater range of choice open to you than Perl/Python/Ruby on the one hand, and C/C++/maybe-Java on the other.
For example, Common Lisp implementations often compile functions as they're entered at the interactive prompt. From your perspective, you see an "interpreter" that runs code on the order of 100 times faster than it should. I'm told popular OCaml and Haskell implementations work this way too.
If you're interested in portability, there are efficient Scheme compilers that target ANSI C, which gives you portability, good integration into just about any environment, and access to lots and lots of library code. My favorite of these is Chicken Scheme, which you can read about at http://www.call-with-current-continuation.org http://www.call-with-current-continuation.org.
- PieSquared 18y agoSo... it's compiling it, but acting as an interpreter. So even the macro-evaluation step is compiled? I seemed to think you'd have to have a Lisp interpreter (so that the macros would have to be interpreted) and optionally a compiler. So you can have the 'interpreter' just be a compiler which is followed by a call to the generated code?