>R. Bhakti Klein wrote:
>
> > Lingo is an
> > interpreted language
>
>I don't believe that it is. Scripts are compiled into a tokenised format
>that is separated from the text of the script. An interpreted language would
>require, I believe, that the text of the script be parsed when the code is
>executed.

Sorry, Zac, Bhakti is right on this one. Lingo is, in fact, an interpreted 
language. The tokenized format gives you a speed advantage over 
non-tokenized interpreters, but is really just an intermediate step between 
raw interpretation and a true compiled language.

Other languages, like UCSD Pascal and Microsoft's early MS-DOS BASIC, were 
tokenized, interpreted languages. That was an improvement over the original 
non-tokenized  Applesoft BASIC (which, incidentally, Bill Gates wrote), 
which limited variable names to 2 characters.

All that tokenization does is take things like variable names, handlers, 
properties, and the like, and convert them to a single number--a 32-bit 
integer in Director, I believe. That means that you can name a variable "x" 
or "theLastVariableIWillEverNeedInThisProgram" without affecting 
performance--they are both converted to the same size token. You are 
correct, though, in stating that text isn't tokenized.

However, at runtime, these tokens have to be converted to machine language. 
In a compiled language, everything is converted to machine language once, 
at compilation. That is, most everything--even in a compiled language, text 
remains text, the same as in Director.

Performance differences between tokenized (interpreted) languages and 
compiled languages show up most dramatically in repeat operations like 
loops. Every time through a loop, the tokens have to be converted to 
machine language--commands or addresses. That process is pretty much a 
textbook definition of interpretation.

Now, to be fair, I'll take issue with another of Bhakti's points in another 
post :-)



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to