Introduction
Configura Magic (CM) is an object-oriented language with extensible syntax and support for incremental development. It is strongly typed, and with few exceptions statically typed. Memory for objects and other values is allocated and reclaimed automatically by a garbage collector.
The original motivation for CM came from dissatisfaction with C++ and the long work cycle caused by the need for restarting and recompiling the program after any changes to the source code.
Compilation Process
CM source files are compiled to machine code before they are executed, but full compilation does not take place immediately. Instead, the source code is translated into different intermediate formats on-demand, and only translated into machine code when the compiler could not delay it any further (JIT Compilation). The compilation process is thus interleaved with the execution of the program. Different source files undergo different degrees of compilation depending on the behavior of the running program.
However, while virtual machines for languages such as Java typically use a mix of interpretation and compilation, the CM compiler never interprets the source code. CM source files are always translated into machine code before they are executed.
Incremental Development
Files can be recompiled at runtime, enabling an incremental development style. For instance, functions can be rewritten and class fields added and removed at will, without having to restart the entire application for the changes to take effect. The development cycle is thus radically shortened, without sacrificing performance. This enables developers to get rapid feedback from the code they are working on.
Source Code Organization
All CM source files should belong to a package and be encoded with the UTF16 character encoding. The source files are usually organized into directories named after the package the files belong to. Source files should have names that end in a dot followed by "cm".
For every developer, there should be a subpackage of cm.profile with the same name as the developer. For instance, if there is a developer with username steot, there should also be a package named cm.profile.steot. When in developer mode, the first source file that is run after a clean start is the file 'boot.cm' in the developer's profile.
Comments
0 comments
Please sign in to leave a comment.