What are the main benefits of migrating to DLR for my scripting language?

I wrote DSL using Antlr to generate a lexer and parser from my grammar file. The parser generates an abstract syntax tree that contains various nodes (for example, the node function) that I can compute. In the code for function nodes, I do the binding - checking function names and parameter types for matches from the function library. I have some simple caching to optimize the function search (if I call A + B with two ints, then there is a strong chance that next time I will use the plus operator, it will be with 2 ints).

I recently read about DLR and seems to have been designed to implement this type of scripting language implementation. At first blushing does not look like it is generating a parser or lexer, but it looks like it helps other parts of the implementation. I was wondering what would be for me the main benefits of switching to using DLR.

+3
source share
3 answers

If you carefully implement the binding, DLR will provide you with a very powerful caching mechanism - perhaps more optimized than you could really do on your own. In addition, you are likely to get good compatibility with other languages, since you will use the “standard” protocol of dynamic objects.

, # 4 , dynamic. DLR, "" CLR.

, , , , . , , , DLR - , .NET, .

+4

.NET .

+2
  • .Net
  • , .Net
  • Microsoft API ( ..).
  • Visual Studio
+2

Source: https://habr.com/ru/post/1711179/


All Articles