Lucid Synchrone is a language that is to ML what Lustre is to Pascal (you know about Lustre, right?). Writing reactive programs as stream equations is as interesting as in Lustre, and new features make it nice to someone who is used to type inference and higher-order.
Since ianh mentions Lucid in the comments, a word to position these stream languages with respect to one another: Lucid is the ancestor. The idea was to make programs easier to reason about by removing the hardest part - the loops. Instead one would write recursive stream equations.
while (some condition) { s = s + i; i++ }
would instead be written as (sorry but it was a long time since I used Lucid syntax, so this probably wouldn't compile):
next i = i + 1
s = s + i
These equations are equations on streams. Every expression in it ("i + 1
", "next i
") is a stream. "'next i'" is the stream i
shifted towards the future, so that the n-th
element of next i
is the (n+1)-th element of i
. Thus the equation next i = i + 1
increment the values in the stream i
, while the language remains purely functional (no side effects) and close to mathematical equations that are easy to reason about.
Lustre stands for "Lucid Synchrone et Temps Rêel", and borrows from Lucid the idea of stream equations, but stream-shifting is made to look towards the past ("pre" operator) instead of the future ("next" operator). It can be compiled to efficient imperative code, and is generally well adapted for implementing reactive programs such as can be found embedded in various contexts. The name "Lucid Synchrone" is in fact a reference to the expansion of the name "Lustre", more than a reference to Lucid, although it is inspired by it indirectly.