Timeline for What makes a scripting language "embeddable"?
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 18, 2020 at 20:15 | comment | added | David Conrad | The only thing I might add is in relation to layers of indirection; if a language like Typescript has several layers of indirection, you either need to embed them all or you need to create a new single-layer implementation of it to embed, which of course is then a whole additional big problem to solve. | |
| Jan 18, 2020 at 6:25 | comment | added | Peter Cordes |
@Delioth: it's pretty hard to build a purely ahead-of-time compiler for a language that includes something like eval - interpret arbitrary runtime data as code. You can AoT compile everything else, but then the runtime environment needs to include an interpreter. Much more natural to interpret or JIT-compile a language with that feature.
|
|
| Jan 18, 2020 at 3:35 | comment | added | ikegami | The embedded interpreter could technically be a in a separate process. What actually makes it embedded is the capability to exchange information between the two environments and for the host environment to be able to call functions/methods in the embedded environment. The term is used when this is made as transparent as possible. | |
| Jan 18, 2020 at 2:57 | comment | added | GrandOpener | @Delioth While there's nothing that absolutely forces a language to be compiled or interpreted, there are things that can make one or the other more or less convenient. Any feature that lets later code affect earlier code (for example, variable hoisting in Javascript) will typically be unavailable for use when run line-by-line through an interpreter. If such a feature is mandated in the language spec, one could potentially argue that stereotypical line-by-line interpretation of the language is not possible. | |
| S Jan 17, 2020 at 19:56 | history | suggested | wallyk | CC BY-SA 4.0 |
fix apostrophe abuse; de-cap spurious capital; clearer word choice
|
| Jan 17, 2020 at 19:17 | review | Suggested edits | |||
| S Jan 17, 2020 at 19:56 | |||||
| Jan 17, 2020 at 16:52 | comment | added | Barmar | @Delioth Many years ago I used the Epsilon text editor. It's an Emacs clone with an embedded C-like extension language. | |
| Jan 17, 2020 at 14:19 | comment | added | Berin Loritsch | If the process is owned by the application, that counts. Chrome owns the process that JavaScript runs inside of. Gimp owns the process that python runs inside of, etc. | |
| Jan 17, 2020 at 12:28 | comment | added | Pablo H | Re: running in the same process. Considering that Chrome, Edge, Visual Studio, etc. split the work into several processes, "same process" can be relaxed a bit. | |
| Jan 17, 2020 at 12:07 | comment | added | lalala | I would add 'static linkage' | |
| Jan 17, 2020 at 10:25 | comment | added | Mast | @SteveMelnikoff You are absolutely right. | |
| Jan 17, 2020 at 10:23 | comment | added | Steve Melnikoff | @Mast: if I've understood correctly, "embedded" in this context is being used in a completely unrelated sense to that used in embedded systems. (This is not the first time that confusion has arisen here over the word!) | |
| Jan 17, 2020 at 9:07 | comment | added | Shadur-don't-feed-the-AI | One risk with embedding if you don't write your own interpreter or very explicitly limit what libraries are available, the embedded scripting language becomes a potential exploit vector. This isn't just a problem with games, it's why browsers nowadays are heavily sandboxed (with all the memory usage issues that entails). | |
| Jan 17, 2020 at 8:24 | comment | added | Mast | This answer seems to be ignoring that embedded languages are linked to embedded hardware/systems. | |
| Jan 16, 2020 at 22:04 | vote | accept | Seanny123 | ||
| Jan 16, 2020 at 21:23 | comment | added | Delioth | It may be worthwhile to mention that generally nothing about a language forces it to be compiled or interpreted - the language is the semantics/syntax/behavior, and anything which has a compiled implementation could have an interpreted implementation and vice-versa. (I.e. it should be possible to implement a C++ interpreter and embed C++ as a ""scripting language"" into your game or whatnot; however un-useful this is) | |
| Jan 16, 2020 at 20:57 | history | answered | Berin Loritsch | CC BY-SA 4.0 |