xp-framework/rfc — Issue #238: xcc -e
Author: thekid
Created: 2012-02-13 09:01:52+00:00
State: open
Labels: language, technology

Scope of Change
==
In conjunction with `xp -e` and `unittest -e`, this RFC proposes to add `xcc -e`.

Rationale
==
Support what both of the other runners already do, evaluate sourcecode directly as the fastest way to discover "what something does".

Functionality
==
The source code will be compiled and then run. The default language will be XP Language, but can be changed with the `-l` argument.

The context is a method declaration. So the following:

```sh
$ xcc -e 'util.cmd.Console::writeLine("Hello");'
Hello
```

... is basically the equivalent of:

```groovy
public class __Generated_1 {
public static void main() {
util.cmd.Console::writeLine("Hello");
}
}
```

Security considerations
==

Speed impact
==

Dependencies
==
The command line argument `-e` ("emitter") will be changed to `-E`. Momentarily, this argument can not be in use as there is only one emitter.

Related documents
==