Skip to content
Kameron Brooks edited this page Sep 21, 2018 · 16 revisions

CCL 0.5.1

What is CCL?

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.

What is the Syntax?

It is very similar to C. The features and syntax guide is here

What is the Purpose of CCL?

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.

How does it work?

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 Interpreter/Runner. 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 parse and interpret the code.

What is the future of CCL and the C# CCL Engine?

At the moment, the C# CCL Engine interprets the script at execution time. It is also heavily reliant on Reflection. To support flexiblity, the engine must also perform a lot of safety checks, boxing/unboxing, and casts. For these reasons, CCL is not good for complex, data-intensive tasks or in time critical code.

Eventually, the goal is for this engine to be able to "compile" the script before execution time, and then execute a concise set of instructions.