Stare

From Esolang
Jump to navigation Jump to search

Stare, for Stack Rewriter, is a set of dialects of a declarative programming language designed by the Zodiac Working Group for rewriting... stacks. Yeah.

Basic Idea

A Stare program operates on a stack with a rewriting system. At least in Stare 1.0, this works by continuously looping through the program, executing lines if and only if a certain condition about the stack is met. The instructions in these lines operate on the stack, making the language entirely stack-based.

Stare is ostensibly declarative, but is, in reality, the most imperative declarative language you can get (or is it the other way around?)

Dialects

There are (or will be) various dialects of Stare, similarly to how there are two different main dialects of Python (2 and 3). Each dialect introduces new features and may change the syntax. Different dialects are neither backwards- nor forwards-compatible.

Statically-typed

Statically typed Stare dialects existed before Dynamically-typed ones. If implementing a dynamically-typed Stare dialect, avoid starting with a statically-typed one and working forwards in updates from there. Instead, either implement directly from the most recent specification, or, if that seems overwhelming, implement from the earliest Dynamically-typed dialect.

1.0

Stare 1.0 is the initial dialect of Stare. It contains all the basic features and is the basis of all Stare dialects made by the ZWG.

1.1

Stare 1.1 introduced new syntax for lines. It makes certain types of code (that where you execute the same code on a set of values) easier and other types of code (where you execute only if certain values are both true or are different) possible.

1.2

Stare 1.2, which is currently in the design process, has so far introduced polymorphic values, which makes executing code if two values are the same possible.

2.0

Stare 2.0 is an upcoming Stare dialect. It introduces user-defined functions, libraries, and more!

Dynamically-typed

All Stare dialects from here on out are dynamically typed. Compiler makers beware.

3.0

3.0 is a far-future Stare update that introduces Basic OO.

4.0

Stare 4.0 is an update that may be so far in the future it postdates humanity (then again, if the Bulletin of Atomic Scientists is to be trusted, even Stare 2.0 may postdate humanity...). It inroduces more OO (and maybe some anonymous functions if you're good).