Часть ченджлога, которую осталось переписать:
- New method definition syntax
`[modifs][Name][](args) {...}`
`[modifs][Name][](args) => value`
- You can now copy contexts with ":" in the following cases:
- New initializers: // [] - optional
`new T [Name][: Ancestors][{...}]`
- New context creators:
`context [Name][: Ancestors] {...}`
`new context [Name][: Ancestors]`
- Statement-like notation (without `;`) for expressions with body:
condition, match, context, new, methods
- Constructor method that creates new contexts
`context TBase { constructor = (f) => this.f = f; };`
`T1 = TBase(5); T2 = TBase(10);`
- The right side of the nested context initializer
assignations now always refers to the self context
`x = 1; context A { context B { x = x; }}`
- Parent keyword in constructed contexts
`T1.parent == TBase;`
- Condition statement is now expression
- Using statement is now expression
- Strong method binding
Язык
- Выражение
static
Выполнение следующего за этим словом выражения будет только один раз.
- get_x() => ^1..10000;
- get_y() => static ^1..10000;
- get_x() == get_x();
- get_y() == get_y();
Несовместимые изменения синтаксиса
Было (0.7.0) |
Стало (0.8.0) |
- new context Name : T {
- x = 2;
- };
|
|
- new context : T {
- x = 2;
- };
|
|
|
|
|
|
- new context Name {
- x = 2;
- };
|
|
|
|
Оптимизации
- Переделка Wrapper'а, ускорение сворачивания контекстов минимум в 3 раза, разворачивания минимум в 20 раз
Исправления