This changes the representation of constants. Things like mapconst were a design smell. Constants are now represented as (constant (x)) which is more verbose but actually more consistent, and therefore easier to work with.
It would probably be best to make calls consistent by marking them explicitly as well. This would mean that f(x, y) is represented by (call (constant (f)) (constant (x)) (constant (y))), which is kinda weird. But we'll need something like call to support first-class functions anyway.
This changes the representation of constants. Things like
mapconst
were a design smell. Constants are now represented as(constant (x))
which is more verbose but actually more consistent, and therefore easier to work with.It would probably be best to make calls consistent by marking them explicitly as well. This would mean that
f(x, y)
is represented by(call (constant (f)) (constant (x)) (constant (y)))
, which is kinda weird. But we'll need something likecall
to support first-class functions anyway.This is obviously breaking.