CPL uses brackets just as you were taught in school. All three kinds of round, square, and curly brackets are interchangeably available for grouping arithmetic expressions or any other of the above usages, but each must be matched by its own kind. To alternate parentheses, brackets and braces, though optional, is beneficial to the human eye's reading and proofreading nested formulas and enhances automatic error catching.
The provided code editor can automatically alternate bracket styles and match bracket pairs for you.
CPL supports the object paradigm but avoids the inclusion of function definitions inside classes in favour of overloaded, polymorphic functions that are qualified by the (oftentimes STRUCTURE) type of one or more of their arguments. It caters for subtyping and inheritance through anonymous STRUCTURE fields, and for dynamically typed objects through DYNAMIC pointers.
interfacefiles that inconveniently duplicate the definitions contained in the program proper.
CPL checks prototype coherence by polling the USEd files in stead of headers, and issues compile-time errors accordingly. The prototype-enforcing process is totally transparent to the user who no longer needs to write separate header files (but may if one wants to).
In CPL the symbolic.cpl library provides symbolic differentiation capabilities. Not only can CPL work backwards through a chain of expressions to calculate a symbolic derivative (discrete adjoint), but it does so transparently without the user needing to even see the intermediate code generated by automatic differentiation: any desired symbolic derivatives are worked out during compilation and inlined in the generated code.
In numerical optimization problems, once the expression of an objective function is programmed in, its derivatives with respect to either a scalar parameter or an array element become immediately available in the same code and can be denoted symbolically just as one would on paper.
A rich set of subarray selections, commuting with structure fields, is efficiently supported.
cpl make <program>[.cpl] [<option>]is all that is needed to compile and link the source file <program>.cpl into the executable file <program>, which you can then run by its name just like any other executable.
Although CPL is compiled, the straight cpl run command makes it act just like a scripting language, directly running a plain-text CPL file by transparently compiling it when and only when it detects a modification.
The interactive CPL interpreter accepts expressions, statements or commands at a console prompt. Any CPL or C or FORTRAN library can be loaded into the interpreter and have its functions invoked from the command prompt, either alone or embedded in a greater CPL command or expression. Unix-shell commands are accepted as well, just as are functions from the system C library.
CPL treads a middle ground by making C-like use of pointers possible, but concealing the near totality of referencing and dereferencing operations under implicit type conversion. Pointer declarations decide whether a function argument is passed by value or by reference, but no special notation has to be used in function calls. Pointer arithmetics is allowed but restricted to the allocated memory space of a single compound variable, and confined to stay there when run-time error checking is on.
classesonly contain data and not functions, and are therefore ordinary STRUCTUREs. The key to their reusability is in that derived STRUCTUREs, containing the data fields of a base type plus their own, can be implicitly converted to their base type. All CPL functions are polymorphic and coactivated by the type of their arguments, and therefore functions declared with the base type as argument can automatically be reused on the derived type without modification (or just their name can be reused to declare a more specific function, as one sees fit). Since functions do not belong to a single class, reusability can be applied to more than one argument, possibly at the same time. When only the first argument is involved, a C++-like dot notation is available to be used where it sounds more adapt to the application.