Stewart Stremler([EMAIL PROTECTED])@Tue, Aug 22, 2006 at 11:24:46AM -0700:
> begin  quoting Wade Curry as of Tue, Aug 22, 2006 at 09:54:08AM -0700:
> [snip]
> > I've always found this terminology confusing.  My own perception is
> > that there is only pre-compiled and interpreted.  The interpreted
> 
> It's probably better to think of it as a continuum.
> 
> > languages are always compiled as far as I can tell, and that
> 
> Um... why?  Did someone start compiling sh scripts?
> 
> I can see an interpreted language parsing, tokenizing, and indexing,
> all without ever compiling anything. 
> 
This is a direct result of my own misperceptions.  I was under the
impression that interpreters converting the code into some kind of binary
representation on the fly.

Now I have to ask what exactly is entailed in
interpreting/compiling code?  Specifically, what distinguishes
them with respect to how the code is handled?

> > byte-compiled code is almost always kept around after the first run
> > to reduce the amount of work required for subsequent runs.  I'm
> > hesitant to call those files "byte-compiled" objects because I'm not
> > confident that's what they really are.
> 
> I'm trying to think of what languages might do that. Smalltalk?
> Lisp?
> 

Python was what I had in mind.  Run a python program and it will
leave a .pyc and/or .pyo file behind (my recollection is fuzzy).
Doesn't perl do something similar as well?

> > So, what is the difference between JIT compiling and just
> > interpreting and saving the compiled objects (runtime compiled)?
> 
> "Just interpreting" doesn't always result in compiled objects. In
> fact, if you're "*just* interpreting", you shouldn't have any.
> 
> > Java obviously gets compiled in a separate step, rather than
> > happening at the time of the first execution; is there something
> > special about byte compiling Java code that would differentiate it
> > in other ways from the interpreted model?
> 
> Java gets compiled (i.e., transformed) into bytecode, which is a
> binary intermediate format, which then gets interpreted; Sun's
> JIT takes the bytecode and further translates it into the local
> hardware's machine instructions.
> 
Hmm... I'm thinking that you meant to say that the *JVM* does
further translation.  If that's not what you meant, then I'm at a
loss.  I thought the JIT was used in place of the regular compiler
so that the byte code was created just before the JVM ran it.

> So yes, Java's interpreted, but then, so is the Linux kernel,
> when I run it on my PPC mac under VirtualPC. 
> 
> > As usual, the terminology and jargon is a bigger barrier to
> > comprehension than the facts.
> 
> Heh.
> 
> Optimization makes things confusing.

I'm *trying* to optimize my comprehension. ;-)

Wade Curry
syntaxman

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to