This section explains the ideas behind the scripting language, and why things are as they are.

BASICoid syntax

The language syntax vaguely resembles BASIC.

In the beginning, there was the report and query language. Essentially, we have three major language families to choose from, and BASIC turns out to be the easiest one for a report and query language. Here's a sample expression:

 Owner=My.Race And Orbit.Enemy

In Pascal style, we'd need additional parentheses, and in C style, we'd have to use "strange" operators (remember our audience is not just programmers):

 (Owner=My.Race) And Orbit.Enemy
 Owner==My.Race && Owner.Enemy

All this completely neglects the underlying language's type system and naming rules. Here, BASIC wins again by being so un-standardized in that area that it doesn't hurt when we add a new dialect :-) Besides, I never claimed this to be BASIC.

However, since PCC2 does byte-compilation, it's now possible to add different front-ends with little effort.

Untypedness

The language is untyped, i.e. it does not require programmers to declare what types of values they want to store in variables.

Besides this being the de-facto standard in scripting languages, a 100% requirement for the language was to have the notion of an unknown value (EMPTY). So, even if we'd allow variables that always contain numbers, they'd have to be able to accept numbers-or-EMPTY. Allowing it to accept numbers-or-EMPTY-or-anything-else just makes not much of a difference.

Dynamic Scope

Dynamic scope means a name is looked up in its current execution context, and needn't be declared in the function it's used in.

This allows many useful features, such as searching for units owned by player 2 by using the expression Owner$=2, and have PCC automatically select ship, planet, or other context.

In PCC 1.x, dynamic scope is the only way to pass values back from a function, without completely reverting to global variables. This is required by things like UI.Input. Although PCC2 allows functions, it keeps this model of user-interface interaction.