o42a-0.1.5 Release Notes

The links and the variables are objects now, inherited from Link and Variable core objects respectively. Their values contain a target objects now. The link interface can be passed to the link object construction expression as type parameter. The link target can be specified as a part of a special phrase:

Link (`integer) [42]
Link (`integer) 42  // Works also
Link (`integer) (   // Canonical form
  = 42
)

The old link definition syntax is still supported without any changes.

A backquote can be used to access the link object itself instead of it’s target: link` .

An arrow can be used to explicitly dereference the link object: link (`integer) [42] ->.

In the simple cases, the link and the variable objects have the same internal representations as a link and variable artifacts had before. So, no overhead will be added, unless a complex link definition or implementation used.

Artifacts are Gone

The link and the variable was the only artifacts apart from the object. Now, when they became objects, the notion of “artifact” is no longer needed. Everything is an object now!

Arrays

Array Objects

The base array objects were renamed:

  • the immutable array is now called Row;
  • the mutable array is now called Array;
  • the base object of these two is now called Abstract array.

Array Syntax

The array constructor syntax have been simplified. To construct the row simply use brackets:

Arr := [1, 2, 3]

A type parameters can be used now to specify the array element type:

Arr := array (`string) (
  = ["a", "b", "c"]
)

An array constructor part of the phrase requires extra brackets to distinguish it from arguments. The core array objects support this syntax for array construction:

Arr := array (`string) [["a", "b", "c"]]

Phrase Syntax Updates

The numeric value is treated as argument when specified without brackets, unless it is a part of name.