Scripting language for C/C++?

后端 未结 12 1772
礼貌的吻别
礼貌的吻别 2020-12-25 07:56

Is there a scripting language for C++ (like perl) which can be used for rapid development and use some tool which can convert into C/C++ program to get higher performance f

相关标签:
12条回答
  • 2020-12-25 08:38

    With a C/C++ interpreter you can use C/C++ as a scripting language

    • Ch: http://www.softintegration.com/

      Commmercial C/C++ interpreter with a free Standard Edition. Has support for various popular libraries and windowing toolkits.

    • CINT: http://root.cern.ch/drupal/content/cint

      Actively developed open-source (MIT license) C/C++ interpreter. Developed as part of the ROOT environment at the CERN. Used by many physicist.

    • ccons: http://code.google.com/p/ccons/

      An interactive C console which employs LLVM and its new C frontend (clang). Under active development

    • UnderC: http://home.mweb.co.za/sd/sdonovan/underc.html

      An open-source (LGPL) C++ interpreter. Seems to be a bit dated (2002).


    Note: So far, I have tried only Ch and CINT. I have added ccons and UnderC to make the list more complete.

    0 讨论(0)
  • 2020-12-25 08:41

    The question could be interpreted different ways...

    If you have already coded a part of your application in C++ and need to add modules or scripts, that you want to add in the C++ code eventually for improved performance, you could use Qt which is a solid, very complete multi-platform framework.

    It includes support for scripts (ECMAScript, the standardized version of Javascript), from which you can access your C++ objects if you need to. It also provides support for plug-ins.

    With that approach, you can even proceed in three steps,

    • first do some tests in Javascript,
    • then code the base of your application in C++ and still use a part in scripts (for example if you need to try different algorithms),
    • and finally port everything, or at least the critical parts, in C++.

    Another option is to embed a Python interpreter in your code, although that will probably require more work.

    0 讨论(0)
  • 2020-12-25 08:52

    Many projects combine e.g. C++ and Python -- see for example boost.python.

    I prefer R and use the Rcpp interface from R to C++.

    Either case gives you your scripting language for prototyping and easy 'glue' to C++ for performance.

    0 讨论(0)
  • 2020-12-25 08:52

    You could code using D programming language as both a script or a fast compiled output.

    • http://dlang.org/
    • http://gdcproject.org/

    here is an article that talks in detail about D and its advantages "The Case for D"

    0 讨论(0)
  • 2020-12-25 08:54

    GML : www.yoyogames.com

    0 讨论(0)
  • 2020-12-25 08:54

    Cling is an interpreter for c++ cling

    0 讨论(0)
提交回复
热议问题