According to my experience, Wikipedia and prior answers, a scripting language is vague category of languages which are high-level (no manual memory management) and interpreted. Popular examples are Python, Ruby, Perl and Tcl.
Some scripting languages can be "embedded". For example:
- Lua is frequently embedded in video game applications.
- TCL is embedded in the fossil version control system
It is sometimes said that Lua is more easily embedded than Python or that JavaScript is difficult to embed, because the size of the interpreter. Similarly, Wren is "intended for embedding in applications".
What factors make a language embeddable? Is it solely the size and speed of the base interpreter or do other factors come into play?
Best Answer
Embedding a language (I'll avoid characterizing it as "scripting") means that the following has been done:
The first bullet is literally the definition of embedding. The main reason to embed a language into an application is to provide an easy means of extending the functionality of the application. Reasons include:
So the big question is then, what factors simplify embedding?
Bottom line is that it is possible to embed a wide range of languages into another application. In some cases, the hard work has already been done for you and you simply need to include the language into your app. For example, IronPython is built on .Net and Jython is built on Java allowing you to easily embed Python into applications built on those platforms.
As far as how robust or complete the implementation is, you will get mixed results. Some projects are more mature than others. Some languages are just easier to implement (there is a reason why LISP was one of the first embedded languages).