nandykins/-g-pl — Issue #11: Allow global execution or not?
Author: nandykins
Created: 2011-11-03 01:24:41+00:00
State: open

Should we allow top-level expressions other than >implying or should we restrict it to those? The practical effect of this is, do we force everybody to create an OP function, or do we allow direct code execution?

The pros and cons of both:

### Allow only top level implications, force OP functions:

#### Pros:
- Functions can be declared in any order, the OP function can be at the top and helper functions at the bottom
- The user can name the args variable to whatever he wants

#### Cons:
- The user is always required to define an OP function, which is generally considered bad for interpreted languages

### Allow top level execution

#### Pros:
- No declaration overhead needed, simple scripts will be simple

#### Cons:
- Functions must be defined before they are used, so all code must effectively be at the bottom of the file