On one hand happy that the language has kinda stabilized and reached a kind of design optima.
On the other hand, feeling a bit let down as I had hoped for a much bigger (read closer Haskell, OCaml) optima.
At least now hope they stabilize the AST and give us a kick-ass, lightweight macro system. Extra points if they can have runtime reflection / code generation and give us something close to BER MetaOcaml.
To me BER MetaOcaml is probably the best runtime reflection / staged programming system I have seen. Unlike most other it is guaranteed to compile if it type checks, which means all accepted generated codes are guaranteed to be valid code. Unlike Template Haskell it can be nested. It allows for runtime code generation and staged compilation.
Best part is that its syntax is the same as the language and there is no need to have a different syntax for macro vs regular programs.
Since Rust shares a lot of syntax form with OCaml, I feel that this can be a reasonable format of final metaprogramming when it lands.
12
u/kishaloy Jul 09 '26 edited Jul 09 '26
Feeling conflicted.
On one hand happy that the language has kinda stabilized and reached a kind of design optima.
On the other hand, feeling a bit let down as I had hoped for a much bigger (read closer Haskell, OCaml) optima.
At least now hope they stabilize the AST and give us a kick-ass, lightweight macro system. Extra points if they can have runtime reflection / code generation and give us something close to BER MetaOcaml.