Обновления

0.8.0 Unnamed update [~.~.~]

    Часть ченджлога, которую осталось переписать:
    - 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
    Выполнение следующего за этим словом выражения будет только один раз.
  1. get_x() => ^1..10000;
  2. get_y() => static ^1..10000;
  3. get_x() == get_x();
  4. get_y() == get_y();

Несовместимые изменения синтаксиса

Было (0.7.0) Стало (0.8.0)
  1. new context Name : T {
  2.     x = 2;
  3. };
  1. new T Name {
  2.     x = 2;
  3. }
  1. new context : T {
  2.     x = 2;
  3. };
  1. new T {
  2.     x = 2;
  3. }
  1. new context Name : T ;
  1. new T Name;
  1. new context : T ;
  1. new T;
  1. new context Name {
  2.     x = 2;
  3. };
  1. context Name {
  2.     x = 2;
  3. }
  1. new context {
  2.     x = 2;
  3. };
  1. context {
  2.     x = 2;
  3. }

Оптимизации

  • Переделка Wrapper'а, ускорение сворачивания контекстов минимум в 3 раза, разворачивания минимум в 20 раз

Исправления

Ссылки