<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18063" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText63533 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>As for relevency, it's a lack of these features that keep me from actually having a great use for what (was) my favorite language until C# came along. :)</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>It turns out that much/all of the code I write today (LINQ providers, controls, etc) relies on attributes and reflection. Unless IP/DLR starts publishing this, what I write actually can't be used in a single-dynamic-langauge environment. And yet, particularly with LINQ providers, dynamic languages would be a *great* environment from which to use them.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>(I'll consider Expression<> and Func<> as seperate issues from this.)</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>So, in the end, it's not really static type generation as much as it is support for the standard reflection API as well as attributes.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@lists.ironpython.com on behalf of Curt Hagenlocher<BR><B>Sent:</B> Wed 7/23/2008 4:39 PM<BR><B>To:</B> Discussion of IronPython<BR><B>Subject:</B> Re: [IronPython] IronPython Post 2.0 Roadmap<BR></FONT><BR></DIV>
<DIV>
<DIV dir=ltr>
<DIV>So, we had a brief hallway discussion today about this topic, and the upshot is that I'm interested in hearing your "real world" use cases for </DIV>
<DIV>a) attributes, and</DIV>
<DIV>b) static type generation in general</DIV>
<DIV> </DIV>
<DIV>By "use case", I mean a scenario that's specifically relevant to you today. By "relevant", I mean that it would be *nice* to be able to write a PowerShell extension in Python, but if you didn't end up writing the extension in another language, then it doesn't really count for what I'm looking for. :)<BR><BR></DIV>
<DIV class=gmail_quote>On Mon, Jul 21, 2008 at 4:16 PM, Keith J. Farmer <<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A>> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">We are talking about *new* features, but you're limiting yourself to existing APIs?<BR><BR>If, for the sake of working nicely with the DLR, the existing reflection API needs to be modified to deal with a more dynamic world, that's not outside the realm of possibility in my books. After all, there has always been talk of IP being able to expose static types for consumption outside of IP. I don't see that this is any less possible now than it was at the start.<BR><BR>Incidentally, Type is an abstract class. Also, ParameterInfo isn't sealed, and implements ICustomerAttributeProvider, which is a public interface:<BR><BR>public interface ICustomAttributeProvider <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider</A>><BR>{<BR> // Methods<BR> object <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Object" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Object</A>> [] GetCustomAttributes <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/GetCustomAttributes(Boolean):Object%5b%5d" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/GetCustomAttributes(Boolean):Object%5b%5d</A>> (bool <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean</A>> inherit);<BR> object <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Object" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Object</A>> [] GetCustomAttributes <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/GetCustomAttributes(System.Type,Boolean):Object%5b%5d" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/GetCustomAttributes(System.Type,Boolean):Object%5b%5d</A>> (Type <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Type" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Type</A>> attributeType, bool <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean</A>> inherit);<BR> bool <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean</A>> IsDefined <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/IsDefined(System.Type,Boolean):Boolean" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Reflection.ICustomAttributeProvider/IsDefined(System.Type,Boolean):Boolean</A>> (Type <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Type" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Type</A>> attributeType, bool <<A href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean" target=_blank>http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.Boolean</A>> inherit);<BR>}<BR><BR><BR>So I think, actually, that this could be done without changing much if any external API. They'd probably need to change some of the internals to return dynamic variants of the info types, but I think that's doable.<BR><BR>________________________________<BR><BR>From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A> on behalf of Harry Pierson<BR>Sent: Mon 7/21/2008 12:59 PM<BR>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>To: Discussion of IronPython<BR>Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR><BR><BR><BR>All of the many overloads of GetCustomAttributes (<A href="http://msdn.microsoft.com/en-us/library/system.attribute.getcustomattributes(VS.85).aspx" target=_blank>http://msdn.microsoft.com/en-us/library/system.attribute.getcustomattributes(VS.85).aspx</A>) need some type of static type info (Type, MemberInfo, ParameterInfo). So supporting custom attributes would require some type of static class as Michael mentions below.<BR><BR><BR><BR>-----Original Message-----<BR>From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A> [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>] On Behalf Of Michael Foord<BR>Sent: Monday, July 21, 2008 12:48 PM<BR>To: Discussion of IronPython<BR>Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR><BR>Keith J. Farmer wrote:<BR>> Attributes can be applied to more than just types -- members,<BR>> parameters, return values (as I recall), etc.<BR><BR>But those all presuppose a static type - right?<BR><BR>IronPython could generate a static class in the compile phase where .NET<BR>attributes are used. Python decorator syntax could be used - class<BR>decorators are now part of Python 2.6 and no-one would object to you<BR>sneaking them into Python 2.5...<BR><BR>Parameter and return type attributes could still use a method decorator<BR>to apply them.<BR><BR>Michael<BR><BR>><BR>> ------------------------------------------------------------------------<BR>> *From:* <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A> on behalf of Curt Hagenlocher<BR>> *Sent:* Mon 7/21/2008 9:51 AM<BR>> *To:* Discussion of IronPython<BR>> *Subject:* Re: [IronPython] IronPython Post 2.0 Roadmap<BR>><BR>> "Availability of a static type" not because IronPython would need to<BR>> access one but because it would need to expose one.<BR>><BR>><BR>> On Mon, Jul 21, 2008 at 9:44 AM, Keith J. Farmer <<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A><BR>> <mailto:<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A>>> wrote:<BR>><BR>> You can create your own attribute classes, for whatever markup.<BR>> Particularly since LINQ-to-*, where they often are used to<BR>> annotate data classes with strings, etc (not references to types).<BR>><BR>> In any event, why does "availability of a static type" enter into<BR>> this? IP can access static types just as well as any other .NET<BR>> language (System.Math comes to mind). The motivation in general<BR>> is to make IP a better producer for CLR types, rather than just a<BR>> consumer, and attributes are an increasingly important thing to<BR>> support.<BR>><BR>> As for expression trees and extension methods, those are to make<BR>> IP a better consumer of a very important API (LINQ and the<BR>> IQueryable stack from .NET 3.5).<BR>><BR>> To be honest, once those 3 features are available in IP, I think<BR>> it would be on par with the mainstream languages in being very<BR>> usable in an exclusive sense.<BR>><BR>> -----Original Message-----<BR>> From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>><BR>> [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>>] On Behalf Of Harry<BR>> Pierson<BR>> Sent: Sunday, July 20, 2008 11:14 PM<BR>> To: Discussion of IronPython<BR>> Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>><BR>> Can you give me some examples where you would use these? The<BR>> problem I see is that many scenarios (WCF contracts, XML<BR>> serialization just to name two) where people want to use a custom<BR>> attribute depends on the availability of a static type.<BR>><BR>> Harry<BR>><BR>> -----Original Message-----<BR>> From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>><BR>> [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>>] On Behalf Of Keith J.<BR>> Farmer<BR>> Sent: Saturday, July 19, 2008 8:13 PM<BR>> To: Discussion of IronPython<BR>> Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>><BR>> votes++<BR>><BR>> -----Original Message-----<BR>> From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>><BR>> [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>> <mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>>] On Behalf Of Michael<BR>> Foord<BR>> Sent: Saturday, July 19, 2008 10:38 AM<BR>> To: Discussion of IronPython<BR>> Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>><BR>> Sanghyeon Seo wrote:<BR>> > 2008/7/20 Harry Pierson <<A href="mailto:Harry.Pierson@microsoft.com">Harry.Pierson@microsoft.com</A><BR>> <mailto:<A href="mailto:Harry.Pierson@microsoft.com">Harry.Pierson@microsoft.com</A>>>:<BR>> ><BR>> >> Hosting features are all done via the DLR, so that's a separate<BR>> team. As for<BR>> >> "ability to interact with the rest of the .Net framework", can<BR>> you be more<BR>> >> specific about what you're looking for in that space? What<BR>> *isn't* IPy doing<BR>> >> that you want it to?<BR>> >><BR>> ><BR>> > .NET attributes?<BR>> ><BR>> ><BR>> +1 :-)<BR>><BR>> Michael<BR>><BR>> --<BR>> <A href="http://www.ironpythoninaction.com/" target=_blank>http://www.ironpythoninaction.com/</A><BR>> <A href="http://www.voidspace.org.uk/" target=_blank>http://www.voidspace.org.uk/</A><BR>> <A href="http://www.trypython.org/" target=_blank>http://www.trypython.org/</A><BR>> <A href="http://www.ironpython.info/" target=_blank>http://www.ironpython.info/</A><BR>> <A href="http://www.theotherdelia.co.uk/" target=_blank>http://www.theotherdelia.co.uk/</A><BR>> <A href="http://www.resolverhacks.net/" target=_blank>http://www.resolverhacks.net/</A><BR>><BR>> _______________________________________________<BR>> Users mailing list<BR>> <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> <mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>><BR>> <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>> _______________________________________________<BR>> Users mailing list<BR>> <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> <mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>><BR>> <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>><BR>> _______________________________________________<BR>> Users mailing list<BR>> <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> <mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>><BR>> <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>> _______________________________________________<BR>> Users mailing list<BR>> <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> <mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>><BR>> <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>><BR>><BR>> ------------------------------------------------------------------------<BR>><BR>> _______________________________________________<BR>> Users mailing list<BR>> <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A><BR>> <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>><BR><BR><BR>--<BR><A href="http://www.ironpythoninaction.com/" target=_blank>http://www.ironpythoninaction.com/</A><BR><A href="http://www.voidspace.org.uk/" target=_blank>http://www.voidspace.org.uk/</A><BR><A href="http://www.trypython.org/" target=_blank>http://www.trypython.org/</A><BR><A href="http://www.ironpython.info/" target=_blank>http://www.ironpython.info/</A><BR><A href="http://www.theotherdelia.co.uk/" target=_blank>http://www.theotherdelia.co.uk/</A><BR><A href="http://www.resolverhacks.net/" target=_blank>http://www.resolverhacks.net/</A><BR><BR>_______________________________________________<BR>Users mailing list<BR><A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A><BR><A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR><BR>_______________________________________________<BR>Users mailing list<BR><A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A><BR><A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR><BR><BR></DIV></DIV><BR>_______________________________________________<BR>Users mailing list<BR><A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A><BR><A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></BODY></HTML>