in reply to Preferred Scripting Language to Embed?

Except that Javascript and Lua (and other embedded scripting languages, like Guile and S-Lang) are full-featured, Turing-complete languages, so you don't get any protection against foot-shooting relative to Perl. If you're going to use a "real" language (like any of the above), you may as well choose one which has the simplest, most user-friendly syntax. That would rule out Javascript at least as much as Perl.

If by "logic" you mean something more declarative than procedural, you could consider Prolog, for which some modules exist: AI::Prolog and Language-Prolog.

We're building the house of the future together.
  • Comment on Re: Preferred Scripting Language to Embed?

Replies are listed 'Best First'.
Re^2: Preferred Scripting Language to Embed?
by jdrago_999 (Hermit) on Oct 12, 2006 at 20:18 UTC
    Let me clarify.

    I want a language that allows variable & method declaration, branching (if/elseif/else) loops (for/foreach/while), recursion and simple data structures (scalar, list, hash).

    When I say "logic" I mean "branching, looping, variable-declaration and assignment, method-calls and return values".

    Things I don't want are file- or socket-io operations, sleep() or exit(). Nor do I want the ability to import other modules.

    I would use Inline::WSC and embed JavaScript and/or VBScript but it is only for Windows and the application I am writing is intended for Linux.
      Things I don't want are file- or socket-io operations...I would use Inline::WSC and embed JavaScript and/or VBScript

      As someone who's supporting legacy VBScript apps, I can tell you that it does allow file operations; indeed, one of the first things I wrote for one app in question was a very basic logging tool. I suspect JS, outside of browser sandboxing, allows similar activities.

      Indeed, I support the idea of you sandboxing the scripting language over trying to find a Turing-complete language with the attributes in question. Sandboxing seems to be "the way" to corral such users, esp. since few languages are restricted in the way you're looking for.

      ----Asim, known to some as Woodrow.