Operator dataOf and "object instance" expression are removed, collections syntax/semantic is improved.
Operator dataOf is removed because object variables can now be accessed by both, data access "." and object access "->", operators. No need to take object data by special switcher like dataOf operator.
Collections now are declared by special syntax col ... of. This highlights that collections are neither objects nor values, but they are a language abstraction for item sequences. Items of a collection can be either objects or values depending on the items type.
Creation of new object instances is now completely an aspect and is implemented via transformations. As result, the type of object variable is a join point, which can be transformed into any initialization expression, and "constructor" is one of possible initialization expressions.
The syntax of message parameters is now unified with local variable declaration with obj/val keywords. The keywords can be omitted if the variable type can be inferred.
- The type of object variable is a join point and can be transformed to any initializing expression (like constructor call)
- Transformation can capture visible variables (locals "height" and "width" in the example) and use them in the initializing expression.
Write a comment