TScript is an object-oriented embeddable scripting language for C++ that supports hierarchical transient typed variables (TVariable).
Its main design criterion is to create a scripting language that can interface with C++, transforming data and returning the result.
For example, the following code snippet show a defined variables Foo and Bar that supports a constructor.
Another striking feature of TScript is the function declarations,[4] which use output parameters rather than return values, and provide syntactic support for these.
The second noticeable thing about the calling conventions is that now all functions have an integrated error handling purpose similar to try{…}catch(…){…} and throw new Exception() of C++ and Java.
This can make writing code much easier for less experienced programmers, allowing them to focus on the logic of the software and not the requirements of the language.
For example, when using the SOAP interface, the remote WSDL will be encoded into the script library, allowing the functions within to be called as if they were coded at design time.
TScript is among a small group is scripting languages that provide the functionality to dynamically load and link to existing shared libraries.
Java through its JNI and VB6 are two other scripting languages that enable code to be written that would load a third party library and execute through its native interface.
Operation system resources such as files, sockets and encryption keys are managed via a reference counting mechanism similar to .NET, so they will be released as soon as there are no variables containing their values.
With the ability to load existing shared libraries, script can access all privileges granted to the user who executes it.
To guard against malicious code, all resources beyond the basic memory allocation are required to be granted to each script.