What is an embedded scripting language?
Asked Answered
G

2

16

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?

Greenaway answered 20/8, 2012 at 18:22 Comment(1)
c# is not a domain-specific language.Oriente
T
7

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.

Trapezohedron answered 20/8, 2012 at 18:31 Comment(0)
E
16

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.

Elonore answered 20/8, 2012 at 18:30 Comment(0)
T
7

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.

Trapezohedron answered 20/8, 2012 at 18:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.