sakno/DynamicScript — Issue #4: Static deduction
Author: sakno
Created: 2011-10-11 09:36:12+00:00
State: open

Introduce a new compile-time operator `inline` that allows to duplicate init expression of constants.

const a = gets();
var b = inline a; //translated into const b = gets();

Static deduction allows to deduce quoted expression at compile time and produces a new lambda:

const a = @@i: %%3 -> %%3: i + %%0 * %%1;
var b = inline a(5, -10, integer); //translated into var b = @i: integer -> integer: i - 50;