Skip to content

Instantly share code, notes, and snippets.

@micahrj
Created May 20, 2011 00:32
Show Gist options
  • Save micahrj/982101 to your computer and use it in GitHub Desktop.
Save micahrj/982101 to your computer and use it in GitHub Desktop.

Syntax

Two things next to each other, as in a b, is called juxtaposition. We will see what this means later.

Any expression may be enclosed within parentheses, as in (a b). This works similarly to parentheses in other languages: it controls the order of evaluation. There is an important difference due to how scope works, or indeed doesn't, in Paws, which we shall understand later.

Any expression may also be enclosed within braces, as in {a b}. This is akin to lambdas/blocks in other languages. It represents an execution value, the meaning of which we shall understand later.

Any sequence of characters that are not whitespace, parentheses, or brackets, as in abcd, is a label.

Values

A list, or fork, as it is sometimes referred to, is simply a sequential set of values.

A label is a globally unique symbol, represented by a string.

An execution is basically a continuation. It represents a bit of code to what point it has been executed so far.

Both labels and executions are forks. They simply have some more invisible data accessible through some natively provided executions.

How Code is Run

Juxtaposition resembles function calling in other languages, but there are important distinctions. There is no program stack in Paws. When one execution calls another, the first execution immediately stops executing while the second one starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment