The execution environment is where the script is run. In compiled languages, the translation environment and the execution environment may not be the same. JavaScript is interpreted and therefore the translation and execution environments are one and the same.
However, JavaScript can be transported across a network and may be executed in a server and then transferred to a client and executed there.
This means that the execution environment may change from time to time. The script should be aware of the context and environment it is being executed in if it needs to be portable in this way.
Future developments suggest that JavaScript may be available in hosted environments that will require the script to be delivered in a compact form. Indeed, some JavaScript interpreters are written in Java and decompose the script to Java byte-codes before executing them in the Java Virtual Machine. If these tokenized JavaScripts were transmitted to a remote machine, then JavaScript could be considered to be a compiled (or semi-compiled) language. In that case the translation environment would be different to the execution environment.
Prev | Home | Next |
Execution context | Up | Exponent-log function |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |