[IronPython] static compilation of Python scripts
dinov at exchange.microsoft.com
Fri May 30 22:58:44 CEST 2008
It's something we've actually tried once - in v1.x we have a static compiler which produces real .NET types. But it's incredibly hacky so I wouldn't suggest anyone to try using it. The big problem with doing this is we basically create P# instead of Python. For example what does:
from foo import *
produce? Is this really a subtype of object?
Another big problem is the API that is exposed to C# isn't very friendly to the C# programmer - everything needs to be typed to take and return object. The only exceptions to this today are when we detect you're overriding a virtual method.
Instead we're much more excited about the whole DLR thing and the possibility of broadly supporting dynamic dispatch from within static languages - something along the lines of http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx. If/when that happens it will solve a large class of the problems of consuming IronPython objects from static languages.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kevin Kubasik
Sent: Friday, May 30, 2008 11:52 AM
To: Discussion of IronPython
Subject: Re: [IronPython] static compilation of Python scripts
Is this something that might happen in the future? I see some
translation problems, but hypothetically there could be some cool
potential, especially in the enterprise field.
On Fri, May 30, 2008 at 4:33 AM, Sanghyeon Seo <sanxiyn at gmail.com> wrote:
> 2008/5/30 Ben Aurel <ben.aurel at gmail.com>:
>> Is it possible to build an assembly that exposes the contents
>> (types,...) when imported into a C# class the same way if it would
>> have be written in plain C#?
> No. Not currently.
> Seo Sanghyeon
> Users mailing list
> Users at lists.ironpython.com
Users mailing list
Users at lists.ironpython.com
More information about the Ironpython-users