Notes! These pages are under construction - and thus very preliminary

qBeta is similar to Beta in the following way: the basic building blocks are objects and objects may be singular - i.e. described directly without being an instance of a pattern. qBeta ia also based on one abstraction mechanism, the pattern, which is a unification of class, method/procedure, function, type, process type, etc. Patterns may be organized in a tree-structured hierarchy by means of subpatterns. Pattern attributes of an object may be virtual and extended in subpatterns - where they may be final bound or further bound - and thus possible to extended in additional levels of subpatterns. Action-parts of a pattern and its subpattern are combined by means of inner. qBeta is block-structured, which means that objects and patterns may be nested arbitrarily. qBeta has a few basic actions like assignment, if-then, leave, restart, and object generation. Finally objects may be active in the form of coroutines that may be scheduled cooperatively and/or pre-emptive - and it is thus possible to define schedulers for active objects..

qBeta differs from Beta in the following way:

  1. A module is a singular object and modules are organized in a hierarchical name space defined by nesting (block-structure) of objects
  2. Declarations and statements may be mixed in any order, and declarations may also give rise to executable code. 

  3. Pattern names may be unary, binary, functional, and keyword - as in Smalltalk and Self, except for functional names. Patterns may have arguments and return values. Arguments may be simple values and references, and arguments may be virtual patterns. A pattern may be executed in order to generate an instance (object). This takes place as follows: pattern arguments must be supplied; the declarations and statements of the object are executed; the return values are returned. One implication of this is that a declaration of a constant (part) object implies that the constant object is executed

  4. Part objects  (also called static objects in Beta) and references to (dynamically created) objects have been replaced by constant- and variable (references to) objects. The basically play the same role as part objects and references in Beta and part objects my be represented as constant objects. In Beta, a value (like Integer) was represented as a part-objects - in qBeta a value may be a constant or variable.

  5. Control structures are defined as (primarily keyword) patterns as e.g. %if exp %then% S1 %else% S2. The only built-in control sequential structures are %if%then%, %leave, %restart, and %inner.

  6. Control structures for active objects include a primitive compare-and-swap, and actions to attach a coroutine to a (physical) core or native thread.
  7. Subpattern restrictions are used to enforce restrictions on subpatterns with respect to: immutability, uniqueness, global access, signatures, interfaces, etc. 

  8. Values in qBeta are represented as immutable objects - in general qBeta supports the definition of immutable objects that a.o. are useful for concurrent programming. Consequently there are no enter/exit parts of objects.

  9. Syntax is based on indentation in the style of Python - with optional use of brackets

  10. Indexed objects are subpatterns of the predefined pattern Indexed and replaces repetitions as in Beta.

The subsections of the introduction contain some simple examples of qBeta object modules.