A scripting language built on C++

imageHome       imageDownloads       imageDocumentation       imageGoogle Code       imageAuthor      


About C++Script

C++Script is a C++ library which provides scripting, dynamic types and dynamic programming within C++.

The dynamic paradigm allows C++ to be used in a much more straightforward way, without requiring knowledge of memory management, classes, templates, containers and iterators.  Many problems can be expressed much more simply using dynamic types.

Dynamic types are also useful for experienced C++ programmers, for prototyping, scripting, interfacing to dynamically-typed languages, dynamic data sources etc.

As a scripting language, C++Script programs are compiled using a standard C++ compiler, can embed standard C and C++ code where performance matters, can be embedded in C++ projects, and can link against standard C++ libraries.

The goal of the project is to provide a simple and easy-to-use facade for C++, whilst making it easy to use the full power of C++ where needed.

Features include:

  • A var type provides a natural syntax to use dynamic types using operator overloading.
  • Dynamic types are garbage-collected.  There is no undefined behaviour, and no memory corruption.
  • A compiler front-end allows cpp files to be "run" from the command line.
  • Dynamic collections implement a variety of containers, without templates.
  • A foreach macro makes it easy to enumerate collections.
  • Dynamic types are thread-safe.  Threading is provided in a robust and simple way through message queues, thread pools and futures. 
  • Dynamic objects can be easily defined in C++.
  • Closures bind arguments to functors, and can implement signals and slots.
  • Dynamic objects can be serialized and pickled (preserving object structure).
  • Easy escape to C and C++ for efficiency, and interfacing with C and C++ libraries.
  • No in-depth knowledge of C++ is required.

Find out more by reading the tutorial.

C++Script is free and open source under the LGPL license.


21st December 2008

Version 0.9.4 released.  The documentation and website have been reorganised. Variadic functions create arrays, lists and sets. 


Download ZIP

Download TGZ