[IronPython] Mixing Languages with the DLR

Jimmy Schementi Jimmy.Schementi at microsoft.com
Mon Mar 31 01:27:14 CEST 2008


I know this works between Jscript and Python. Ruby doesn't yet play by the rules for method lookup. Fire up dlrconsole and see for yourself:

http://dynamicsilverlight.net/see/dlrconsole

js> function foo() {
js|   return 42
js| }
py> a = foo()
py> a
42.0
js> a
42.0

How it works? I believe it's something to do with sharing scopes, but you can take a look @ http://dynamicsilverlight.net/see/dlrconsole.zip. Everything is in /app/app.py

John, any idea when Ruby will play nicely with other languages?

~Jimmy

On 3/30/08 8:25 AM, "Michael Foord" <fuzzyman at voidspace.org.uk> wrote:

Hello all,

A quick question on mixing languages with the DLR. If we have an
execution scope that we have executed code in - can we execute code from
another language in the same scope?

If this is trivially easy (just use a different engine to execute the
code in the same scope) then we could make Resolver One scriptable in
the DLR language of your choosing... (Why anyone would want to use
anything other than Python I don't know).

Michael
http://www.ironpythoninaction.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080330/1e3f3c2e/attachment.html>


More information about the Ironpython-users mailing list