Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Weakly or strongly typed scripting language?
Forum Updated to NodeBB v4.3 + New Features

Weakly or strongly typed scripting language?

Scheduled Pinned Locked Moved Language Bindings
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T3STYT Offline
    T3STYT Offline
    T3STY
    wrote on last edited by
    #1

    There are lots of scripting languages available; those I like are Lua, JavaScipt, Angelscript and Chaiscript.
    The first two (Lua and Javascript) are weakly typed, which means there is not much strict syntax and script developing might be faster. However, Lua lacks "C++ support", so you cannot export your C++ objects and methods directly to it (you may do so with proxies and additional headache and code). JavaScript looks more straightforward, but I haven't been able to compile Google's V8 engine and most alternatives simply don't look quite attractive.
    The last two (Angelscript and Chaiscript) are strongly typed which might not be very pleasant for developing into for most people (I personally don't mind, or even prefer strong typed languages). On the up side they are built with C++ in mind, exporting C++ objects to the script is as simple as "done", and performance is not bad at all.

    Keeping in mind that I would like to use a scripting language for developing a plugin system where each plugin will also be developed by beginner or unexperienced programmers, do you think it would make a huge difference choosing a strongly or a weakly typed language? Would developers run away from developing plugins just because of this?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      [quote author="T3STY" date="1424406473"]JavaScript looks more straightforward, but I haven't been able to compile Google's V8 engine and most alternatives simply don't look quite attractive.[/quote]Have you seen Qt's "QJSEngine":http://doc.qt.io/qt-5/qjsengine.html ?

      [quote author="T3STY" date="1424406473"]do you think it would make a huge difference choosing a strongly or a weakly typed language? Would developers run away from developing plugins just because of this?[/quote]Interesting question! You should survey your potential users, as personal preferences in this area can be quite varied.

      Here's one case study: When Google wrote the VoltAir game, they said that JavaScript helped them work more efficiently (but bear in mind that this is partially because JavaScript is integrated into QML): http://google.github.io/VoltAir/doc/main/html/index.html#16

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • T3STYT Offline
        T3STYT Offline
        T3STY
        wrote on last edited by
        #3

        I didn't know about QJSEngine, How could I miss it?

        Yeah, I should question potential users. But now that I found QJSEngine I will first check it.

        Thank you very much for your help!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved