-
Notifications
You must be signed in to change notification settings - Fork 0
Home
CCL(Contextual C-like Language) is a programming language that resembles the C language, that can be interpreted at run-time and derives its extended functionality from a predefined context that exists within the application.
It is very similar to C. The features and syntax guide is here
CCL was designed to be used with Unity games and applications. CCL provides a way to run script that is defined or loaded at run-time. With CCL, additional functionality can be added to your project after it is already released. There are a few reasons that a developer may want to do this. I will expand upon this concept here.
The basic idea behind CCL is that it is driven by a predefined "Context". Before a CCL script is run, a Context object is passed to the CCL script. The context defines the interface that is required for the script to interact with your application. CCL can act on the provided object to get data in and out of the application.
A CCL file or CCL script can be loaded while the game/application is running. The application can then compile the code into a new function and invoke that function.
The goals for CCL are to improve performance of compiled code. There will be compiler optimizations that make the compiled code faster at execution time. The interface between CCL and the Context object is reliant on reflection, which can be 1000 times slower than a member access operation. This can make context interactions slow. I will be implementing performance improvements in this area.
Eventually, the goal would be to push the limits of execution speed of dynamically added code and get execution times closer to native C#.
- Run dynamic code
- Insert functionality into an application after it is already released
- Familiar style as C/javascript
- Compiled CCL is about 10-100 times slower than executing C# code
- Reliance on reflection (causes slowness)
Questions? Comments?
Contact me at [email protected]
Follow on Twitter: @wasteland_11
Copyright 2019 © Kameron Brooks