Thomas 'PointedEars' Lahn <> writes:
> Please do note that J(ava)Script/ECMAScript (following: JS) are compiled
> languages and they are interpreted ones.
The only meaningful way to distinguish what I would call compiled and
what I would call interpreted languages, is that compiled languages
are compiled only once, whereas interpreted languages start from the
source code each time they are run.
Any language can be compiled to something else, and any language can
be interpreted by a suitable interpreter, so it's not really the
language that decides, as much as the common use of it. Then again,
some languages are more obviously build for interpretation than
others.
I'd say that JavaScript was designed for interpretation rather than
compilation. This is suggested by a lot of small properties rather
than one specific thing. It's things like the availability of "eval",
allowing handling of source code at run time, and the lack of, e.g.,
types, which are practical when you can check them statically at
compile-time.
So, I'd call JavaScript, and ECMAScript, interpreted languages,
not compiled ones, because they are typically run from source
every time, and are designed to be so.
/L
--
Lasse Reichstein Nielsen -
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'