3 ms·
It isn't well defined? I always thought a scripting language was evaluated/compiled at runtime (therefore slower, often allowing dynamically generated code to b
by crazygringo 13y ago
It isn't well defined? I always thought a scripting language was evaluated/compiled at runtime (therefore slower, often allowing dynamically generated code to be executed, no low-level memory management like pointers), versus traditional languages which are compiled (either to assembly, or some intermediate representation, but dynamically generated code in the original language is necessarily out of the picture).
Obviously the name "scripting" comes about from the fact that such langauges are intended for "scripting" automating interaction with "objects" (application scripting, HTML scripting, shell scripting, etc.), and that high-level features and on-the-fly execution are more important than performance.
I've never met anyone who thought Python wasn't a scripting language -- I mean, you run the Python interpreter on the script file. And I've never met anyone who would call a compiled language (C, Java, etc.) a scripting language. The distinction is pretty clear to me; maybe other people can think of counterexamples?
- adamnemecek 13y agoWell there is a distinction between the language and the language implementation. Being scripted or compiled is a feature of the implementation but a lot of people think that it's a feature of the language. It is kind of a pedantic point to make but there are for example CINT (http://en.wikipedia.org/wiki/CINT http://en.wikipedia.org/wiki/CINT) which is an interpreter for C/C++ or BeanShell (http://en.wikipedia.org/wiki/BeanShell http://en.wikipedia.org/wiki/BeanShell) which is an interpreter for Java.
- YZF 13y agoPython is compiled into Python byte code. Is Scala compiled or interpreted? (it has a REPL...) http://stackoverflow.com/questions/2998215/if-python-is-interpreted-what-are-pyc-files http://stackoverflow.com/questions/2998215/if-python-is-inte... Do we need to compile to machine languages? What about a VM? What about the Python VM is different than the Java VM or the .NET VM? Is C# therefore a scripting language or a ______ language. (fill in the blank) ActionScript? What about JIT compilers? JavaScript? At any rate, I think you're trying to say scripting langugage == interpreted language but there are probably interpreted languages (let's say Prolog) that you wouldn't call scripting languages and there are compiled languages that can be used for "scripting". I agree that typically scripting languages are interpreted. But I would call Python a general purpose language and not a scripting language.
- zanny 13y ago> Do we need to compile to machine languages And then, everything always eventually compiles to machine code, some just do it at runtime!
- gngeal 13y agoIt isn't well defined? Have you seen Oberon?
- facorreia 13y agoBeing executed through an interpreter, compiled to native code or something in-between (intermediary code) are several possible implementations of a given language. In the 80s, the same language, BASIC, could be either interpreted at runtime or compiled to intermediary code. And there was even a C language interpreter.
- gngeal 13y agoThere are at least two major C and C++ interpreters today.