The short answer to this is yes.  But there's a longer answer too :)

First off, it's not like you're going to be able to do:

class MyPythonClass(object):
    def MyPythonFunc(self): pass
    def MyRubyFunc
    end

or anything like that.  There's also no plans to support subclassing because 
generally the type systems are just too different.  But you can monkey patch 
all you want.  So you could do:

class MyPythonClass(object): pass

then in Ruby:

MyPythonClass.someFunc = someProcOrBlockOrWhateverThoseRubyGuysDo

And you could get crazy with metaclasses or other such magic to make this more 
seamless.

The other part of the long answer is that this doesn't necessarily work today - 
I'm actually not sure whether it does or not today.  We're actually in the 
process of finalizing the interop protocol right now and when that's done and 
all the languages have adopted the new protocol we'll start testing this and 
ensuring we have good interop.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stephens
Sent: Thursday, June 26, 2008 3:44 PM
To: Discussion of IronPython
Subject: [IronPython] DLR question

I have a DLR question and was wondering if you guys knew.  We have a python 
scripting system for our application.  We would like to add iron python to it 
as well.  My question is can I define a ruby function and an iron python 
function in the same class?  That way they can write ruby functions and python 
functions and they can all be bound with the same local variables and class 
state etc.

Michael Stephens

Electrical Engineering Graduate Student
University of Wyoming
[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> or [EMAIL PROTECTED]<mailto:[EMAIL 
PROTECTED]>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to