Currently, let/delay expressions typically look like this:
let/delay '(st1, st2, ... stN) :=
let tmp1 := ... in
let tmp2 := ... in
...
let tmpM := ... in
(new_st1, new_st2, ... new_stN)
initially (init_st1, init_st2, ..., init_stN)
in
rest
I find these hard to read because the tuple (st1, st2, ... stN) is quite far away from the tuple (new_st1, new_st2, ... new_stN) that gets assigned to it, and to know which state variable st gets assigned which new_st, I have to determine and compare their position within the tuple, which is not very convenient.
The same problem occurs when trying to determine the initial value of each st.
I would find it better to have a syntax where the initial value and the updated value of each state variable are next to the name of the state variable, eg like this:
Yeah I think this could be a good change. Perhaps let/delay b1 := e1 and b2 := e2 ... in ... or something might be closer to OCaml? I agree the distance+tupling is not clear right now.
Currently,
let/delay
expressions typically look like this:I find these hard to read because the tuple
(st1, st2, ... stN)
is quite far away from the tuple(new_st1, new_st2, ... new_stN)
that gets assigned to it, and to know which state variablest
gets assigned whichnew_st
, I have to determine and compare their position within the tuple, which is not very convenient. The same problem occurs when trying to determine the initial value of eachst
.I would find it better to have a syntax where the initial value and the updated value of each state variable are next to the name of the state variable, eg like this:
Should we try to implement a notation similar to this one?