What is an embedded scripting language? What are some advantages it would have over the domain specific language?
"A number of languages have been designed for the purpose of replacing application-specific scripting languages by being embeddable in application programs." -Scripting language (wiki)
Javascript.NET is one such example. It can be used in place of c# for example. However, what constitutes the difference between a scripting language, and an embedded scripting language? Moreover, why would javascript be more desirable than C# - or any other domain specific language?
The main scripting languages, Perl, Python and Ruby can all function as an embedded scripting language, and TCL was designed for just such a role.
You have probably already heard of PHP, Python, JavaScript and jQuery. These are just a few examples of scripting languages that power the web and plenty of applications you and millions of other Internet users execute every day.
A scripting language is a programming language that employs a high-level construct to interpret and execute one command at a time. In general, scripting languages are easier to learn and faster to code in than more structured and compiled languages such as C and C++.
An embedded scripting language would be a scripting language (or more specifically an interpreter for such a language) that can be embedded into applications. Thus, the interpreter has an API that can be used to integrate it into the application, allowing scripts to control all or parts of the application.
the advantage is that application developers only have to provide the interfacing with the language; they don't have to implement the actual language. This allows more complex and feature-rich languages to be used, since there's no development time (from the application developer point of view).
For users, it means they know the pros and cons, the quirks and benefits of the scripting language, provided we are talking about a commonly used one.
For your core business, you probably should not use an embedded language, but there are other upsides of using an embedded language. Most importantly, in my experience, it is beneficial to have an easy-to-use language on which other users can build against your system. While theoretically it is possible to build against your system with proper definition of interfaces, it is a lot more user-friendly to let inexperienced people play with JavaScript and Lua, instead of having to set-up an entire environment to deploy in .NET.
Of course, it is easy to hot-swap embedded languages and it can speed up your testing considerably; it is also possible to see your changes immediately without reloading your application, because you just reload a small virtual machine for that embedded language.
I personally employed this to allow people to write assisting scripts against a game.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With