[Mono-dev] What would you like to see in Mono?

Tomi Valkeinen tomba at bat.org
Wed Mar 29 07:22:37 EST 2006


On Wed, 29 Mar 2006, Jonathan Pryor wrote:

> On Wed, 2006-03-29 at 13:02 +0300, Tomi Valkeinen wrote:
>> - More support for dynamic languages. Perhaps there's an unsafe way (read:
>> you have to know what you are doing) to unload types. Or perhaps a
>> modified mcs could generate code for dynamic methods. Or something else I
>> haven't thought about =).
>
> What do you have in mind, exactly?
>
> .NET 2.0 added System.Reflection.Emit.DynamicMethod, largely to target
> dynamic languages such as IronPython.  It provides access to an
> ILGenerator for a method, and the DynamicMethod + IL + assembly language
> is garbage collected in the usual fashion (instead of being tied to an
> Assembly, thus necessitating an AppDomain unload to free the memory).
>
> Given IronPython is Microsoft's dynamic-language testbed, and it's
> running rather nicely under .NET, I'm not sure how much more needs to be
> added to better support dynamic languages...

Hi,

Yes, DynamicMethod is quite a nice feature, and IronPython is a great 
tool, I've been using them both.

But DynamicMethods have their downside, as they are, in a sense, just 
plain global static functions. You lose the class structure etc.

I imagine that unloading a type is possible, but it's very hard to ensure 
that no one will use that unloaded type. But if I implement a framework 
that handles the type loading and unloading, I could live with the fact 
that if the core framework bugs, the application will crash.

I think the IronPython guys have problems because of DynamicMethods. 
DynamicMethods are very good for helper functions, like complied regexp 
parser, but using them to implement a full object oriented language is not 
that simple. Of course DynamicMethods are much better than what we had in 
.Net 1.1 (ie. nothing =).

Also, I don't like python very much, and I'd like the language to be 
strictly typed. What I would like is a C# with type unloading.

  Tomi



More information about the Mono-devel-list mailing list