Comments
Multi-paradigmatic language whose feature set emphasizes support for articulate programming.

Avail is the pioneer of articulate programming. Its numerous features cooperate for a singular purpose: to enable a programmer to talk about her objects of interest using the best language for the domain of her problem. In no particular order, Avail's feature set includes at least:

  • A modular, dynamic, unrestricted grammar supported by an efficient compiler that concurrently explores all possible parses in pursuit of a semantically unambiguous interpretation.
  • An infinite algebraic type lattice that confers a distinct type upon every distinct value.
  • Intrinsic support for a rich collection of immutable types, including tuples, sets, maps, functions, and continuations.
  • A static type system capable of leveraging every feature of the type lattice.
  • Efficient multiple dispatch for all named operations.
  • Automatic memory management capable of coalescing equivalent immutable values.
  • A concurrency model that features lightweight threads multiplexed onto a pool of native threads and managed by a time-slicing, priority-driven preemptive scheduler.
  • Lock elision for accesses of values that are visible only to a single lightweight thread.
  • Fully asynchronous I/O: no Avail thread is ever blocked waiting for an I/O event.
  • Reified immutable continuations that support resumable exceptions, computational backtracking, and general coroutines.
  • A module system that supports hierarchical encapsulation and method renaming.
  • Separation of source code and object code.
  • A universal serialization framework that supports even functions, continuations, and lightweight threads.
  • Sincere and model-complete introspective facilities.
  • A mechanism for observing expressions rather than values, thereby enabling a novel method of efficient, transactional change propagation that is more natural and powerful than the observer pattern or functional reactive programming.
  • An optimizing dynamic translator that supports type inference, function inlining, and de-optimization.
  • Bidirectional foreign function interface to Java.
Public method "Play Wump the Wumpus with reader_with reporter_" is
[
    reader : []→string,
    writer : [string]→⊤
|
    /* Set up the game's I/O. */
    Wump the Wumpus reader := reader;
    Wump the Wumpus reporter := writer;
    /* Create a new game. All references to game objects within the block are
     * implicitly understood as relative to this new game.
     */
    newGame ::= a game of Wump the Wumpus;
    Use newGame as the implied game and do
    [
        Welcome;
        Look around, having just entered;
        Until the game is over, do
        [
            Give the agent a turn;
            Give the first swarm a turn;
            Give the second swarm a turn;
            Give the wumpus a turn;
        ];
        If the agent is alive then
        [
            If the wumpus is dead then [Report victory;]
            else [Report cowardice;];
        ]
        else [Report defeat;];
        Goodbye;
    ];
] : ⊤;
Information updated 01/19/15
View Comments