As mentioned at the start page, the main purpose of this project is to develop a new language derved from Beta.
Ss part of the project, we the IDE also supports a variant of the original Beta language.
Below we describe how this variant differs from Beta.
Modularization
A new module mechamism based on singular nested objects has replaced the fragment system of the official BETA language.
A module is a singular object (object-descriptor to be precise) that has the property of being mapped to a file.
Modules may be nested and are mapped to a hierarchical directory/file-structure.
For a description of the new module system see the paper
- Ole Lehrmann Madsen: Modeling and Browsing - an Integrated Design, draft version, August 2011
Coroutines
In the official BETA language there is a distinction between objects of kind item and component. An item is a passive object and a component is an active object that behavves like a coroutine.
In BETA, any object may be a coroutine.
Repetitions
Repetitions (the BETA term for arrays) are inspired by indexed objects in Smalltalk. An object-descriptor may declare at most one repetition, which is inlined in the object. The elements of the repetition may be accessed in the usual style.
Example
stack:
(# top: @integer;
elements: [0] @integer;
push: (# elm: @integer enter elm do top + 1 -> top; elm -> elements[top]; #);
pop: (# elm: @integer do elements[top] -> elm; top - 1 -> top exit elm #)
#);S: ^Stack
do ...; &Stack(100)[] -> S[]; 14 -> S-push; ...
Pattern text
The pattern Text is implemented using the new repetition mechanism
A text-literal like 'Hello world' is represented by a Text-object.
It is thus possible to invoke operations on a text-literal like
'world' -> 'hello '.append
Subpattern restrictions
A pattern may be restricted by subpattern restrictions.