Chris Donnan : Programming – Brooklyn Style
software, trading, family, fun
Posted dynamic languages, python, ruby on Friday, September 15th, 2006.
I am looking forward to embedding some modern object oriented scripting in my upcoming applications. IronPython is the best candidate currently. Spring.net as an ‘expressions’ framework. It is basically an Antlr based executor of string C# code – see here. This comes with the runtime burdens (non-trivial sometimes) the code management issues of Antlr (C# code generation). It is also not a complete language; you cant use all of C#. I have used the expressions stuff in certain conditions. I have also done a few variations of my own reflection based ‘mini-languages’. I have done my own operator precedence parsers, etc. Using a more complete – powerful scripting language like Ruby or IronPython seems great… Here is a brief article about how to embed the IronPython engine in your C# application.
I will also mention that Ruby CLR has come a long way. I have been following both the Ruby CLR that John Lam has been working on, as well as the Gardens Point Ruby CLR Compiler project. I would say that IronPython is certainly ahead, but they will be there soon (I bet Ruby CLR before Gardens Point).
I believe that embedding these languages in my larger .net applications at the approprate layers of abstraction will enable removal of plenty of, reflection code and XML configuration. These are often used in conjunction to allow some extension points. Expressions and my mini-languages have been useful here. Class types implementing an interface and the concretion type in some XML config file is SO common. Moving more of this to a LANGUAGE like Ruby or Python will be welcome!
-Chris
Comment on this post below
You must be logged in to post a comment.
You can leave a response, or trackback from your own site.







