4 ms·
I could do that in C# as well if I felt I needed it. Define classes representing the "syntax/AST", utility functions to build the AST and an interpreter that co
by zvrba 8y ago
I could do that in C# as well if I felt I needed it. Define classes representing the "syntax/AST", utility functions to build the AST and an interpreter that compiles the AST to an expression tree which in turn is an executable lambda.
It's what EFCore does, translates C# method calls into SQL statements via lambdas bound to expression trees.
So, no, LISP is not special in that regard.
- lispm 8y ago> LISP is not special in that regard It's just MUCH MUCH easier, standardized and widely used.
- zvrba 8y ago> easier For routine code generation, there are even simpler T4 templates. That one gets as easy as one could want. > standardized So are expression trees: https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions?view=netcore-2.2 https://docs.microsoft.com/en-us/dotnet/api/system.linq.expr... > and widely used By what statistics?
- lispm 8y ago> So are expression trees But they are not easier. Pick one or two out of three. > By what statistics? Number of defined or used macros per lines of Lisp code.