3 ms·
C# Expression Tree in different programming langauges
This is a general question. One of the features I really like in C# is building Expression Tree and the ability to generate code truly at runtime. I am wondering in what other languages we have a similar feature. To be specific:
- I believe the compiler should be just-in-time to be able to generate runtime code and load it
- The language has to be statically typed otherwise if it is interpreted then we are not generating AST, we are generating code as "string"
- Macros which is common in ahead-of-time languages is not a true alternative to expression trees; because I think it is defined at the compile time.