The Q Programming Language System

We can think of Q as comprising:

- A common run-time system for very-high-level languages.
It is written in C++, and consists of a hierarchical
set of classes for representing numbers, functional
objects, collections, files, symbols, and so on.

- Parsers for Common Lisp and Scheme, with a growing
set of functions to implement Lisp and Scheme objects.
Implemented are generic arithmetic (including
infinite-precision rationals), most of FORMAT, packages,
multiple values, arrays, EVAL, and much more.
A compiler can translate (much of) Lisp (or Scheme) to C++.
It is used to generate the interface between Lisp objects
and separately compiled C++ functions.

- A new programming language (tentatively called Q) that
I use to explore ideas in programming languages.
Q is a very high-level language.  In the same way that
APL uses arrays to avoid explicit looping, Q uses
generalized sequences.  These sequences can be finite
or infinite; they can be stored explicitly (lists arrays
or external files), or calculated on demand.
Q also has lexical scoping, and some support for logical
and constraint programming.  Q can be compiled (into C++),
or interpreted interactively.  The syntax was designed
to make it a convenient interactive command language.
A macro facility together with primitives to run programs
is used to make a powerful shell.

Q has been developed by Per Bothner (currently at Cygnus
Support) over a number of years.  It is not ready for
general use, but people who want to experiment with it
should contact bothner@cygnus.com.

-------------------------

The Q Programming Language System

The Q system has two semi-independent aspects:

1) A new very high-level programming language.
Where APL uses arrays to avoid explicit looping, Q uses
generalized sequences (finite or infinite, stored or
calculated on demand).  Q has lexical scoping, and some
support for logical and constraint programming.  Q can
be compiled (into C++), or interpreted interactively.
The syntax was designed to make it a convenient interactive
command language.  A macro facility together with primitives
to run programs is used to make a powerful shell.

2) A common run-time system for very-high-level languages.
It is written in C++, and consists of a hierarchical
set of classes for representing numbers (including
infinite-precision rationals), functional
closures, collections, files, symbols, and so on.
There are also functions that implement Common Lisp and
Scheme functionality, such as READ, EVAL, FORMAT,
COMPILE-FILE (compiles much of Common Lisp into C++),
packages, arrays, and more.  With some help, this
could be made into a portable, efficient, free Lisp system
with exceptional integration between Lisp and C++.

Q is not ready for general use, but people who want to
experiment with it should contact Per Bothner (bothner@cygnus.com).
