[IronPython] DLR question

Ben Hall ben2004uk at googlemail.com
Fri Jun 27 02:09:27 CEST 2008


Will we ever be in a position where, for example, Rails could run on
top of Python and that level of interop?

Ben


On Fri, Jun 27, 2008 at 1:01 AM, Dino Viehland
<dinov at exchange.microsoft.com> wrote:
> The short answer to this is yes.  But there's a longer answer too J
>
>
>
> 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: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] 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
> falcon at uwyo.edu or 89iroc at gmail.com
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>



More information about the Ironpython-users mailing list