<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>&nbsp;</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.&nbsp; Unless IP/DLR starts publishing this, what I write actually can't be used in a single-dynamic-langauge environment.&nbsp; 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>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>(I'll consider Expression&lt;&gt; and Func&lt;&gt; as seperate issues from this.)</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>So, in the end, it's not&nbsp;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&nbsp;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>&nbsp;</DIV>
<DIV>By "use case", I mean a scenario that's specifically relevant to you today.&nbsp; 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 &lt;<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A>&gt; 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. &nbsp;After all, there has always been talk of IP being able to expose static types for consumption outside of IP. &nbsp;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. &nbsp;Also, ParameterInfo isn't sealed, and implements ICustomerAttributeProvider, which is a public interface:<BR><BR>public interface ICustomAttributeProvider &lt;<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>&gt;<BR>{<BR>&nbsp; &nbsp;// Methods<BR>&nbsp; &nbsp;object &lt;<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>&gt; [] GetCustomAttributes &lt;<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>&gt; (bool &lt;<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>&gt; &nbsp;inherit);<BR>&nbsp; &nbsp;object &lt;<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>&gt; [] GetCustomAttributes &lt;<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>&gt; (Type &lt;<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>&gt; &nbsp;attributeType, bool &lt;<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>&gt; &nbsp;inherit);<BR>&nbsp; &nbsp;bool &lt;<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>&gt; &nbsp;IsDefined &lt;<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>&gt; (Type &lt;<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>&gt; &nbsp;attributeType, bool &lt;<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>&gt; &nbsp;inherit);<BR>}<BR><BR><BR>So I think, actually, that this could be done without changing much if any external API. &nbsp;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>&gt; Attributes can be applied to more than just types -- members,<BR>&gt; 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>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; *From:* <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A> on behalf of Curt Hagenlocher<BR>&gt; *Sent:* Mon 7/21/2008 9:51 AM<BR>&gt; *To:* Discussion of IronPython<BR>&gt; *Subject:* Re: [IronPython] IronPython Post 2.0 Roadmap<BR>&gt;<BR>&gt; "Availability of a static type" not because IronPython would need to<BR>&gt; access one but because it would need to expose one.<BR>&gt;<BR>&gt;<BR>&gt; On Mon, Jul 21, 2008 at 9:44 AM, Keith J. Farmer &lt;<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A><BR>&gt; &lt;mailto:<A href="mailto:kfarmer@thuban.org">kfarmer@thuban.org</A>&gt;&gt; wrote:<BR>&gt;<BR>&gt; &nbsp; &nbsp; You can create your own attribute classes, for whatever markup.<BR>&gt; &nbsp; &nbsp; &nbsp;Particularly since LINQ-to-*, where they often are used to<BR>&gt; &nbsp; &nbsp; annotate data classes with strings, etc (not references to types).<BR>&gt;<BR>&gt; &nbsp; &nbsp; In any event, why does "availability of a static type" enter into<BR>&gt; &nbsp; &nbsp; this? &nbsp;IP can access static types just as well as any other .NET<BR>&gt; &nbsp; &nbsp; language (System.Math comes to mind). &nbsp;The motivation in general<BR>&gt; &nbsp; &nbsp; is to make IP a better producer for CLR types, rather than just a<BR>&gt; &nbsp; &nbsp; consumer, and attributes are an increasingly important thing to<BR>&gt; &nbsp; &nbsp; support.<BR>&gt;<BR>&gt; &nbsp; &nbsp; As for expression trees and extension methods, those are to make<BR>&gt; &nbsp; &nbsp; IP a better consumer of a very important API (LINQ and the<BR>&gt; &nbsp; &nbsp; IQueryable stack from .NET 3.5).<BR>&gt;<BR>&gt; &nbsp; &nbsp; To be honest, once those 3 features are available in IP, I think<BR>&gt; &nbsp; &nbsp; it would be on par with the mainstream languages in being very<BR>&gt; &nbsp; &nbsp; usable in an exclusive sense.<BR>&gt;<BR>&gt; &nbsp; &nbsp; -----Original Message-----<BR>&gt; &nbsp; &nbsp; From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;] On Behalf Of Harry<BR>&gt; &nbsp; &nbsp; Pierson<BR>&gt; &nbsp; &nbsp; Sent: Sunday, July 20, 2008 11:14 PM<BR>&gt; &nbsp; &nbsp; To: Discussion of IronPython<BR>&gt; &nbsp; &nbsp; Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>&gt;<BR>&gt; &nbsp; &nbsp; Can you give me some examples where you would use these? The<BR>&gt; &nbsp; &nbsp; problem I see is that many scenarios (WCF contracts, XML<BR>&gt; &nbsp; &nbsp; serialization just to name two) where people want to use a custom<BR>&gt; &nbsp; &nbsp; attribute depends on the availability of a static type.<BR>&gt;<BR>&gt; &nbsp; &nbsp; Harry<BR>&gt;<BR>&gt; &nbsp; &nbsp; -----Original Message-----<BR>&gt; &nbsp; &nbsp; From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;] On Behalf Of Keith J.<BR>&gt; &nbsp; &nbsp; Farmer<BR>&gt; &nbsp; &nbsp; Sent: Saturday, July 19, 2008 8:13 PM<BR>&gt; &nbsp; &nbsp; To: Discussion of IronPython<BR>&gt; &nbsp; &nbsp; Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>&gt;<BR>&gt; &nbsp; &nbsp; votes++<BR>&gt;<BR>&gt; &nbsp; &nbsp; -----Original Message-----<BR>&gt; &nbsp; &nbsp; From: <A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; [mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:users-bounces@lists.ironpython.com">users-bounces@lists.ironpython.com</A>&gt;] On Behalf Of Michael<BR>&gt; &nbsp; &nbsp; Foord<BR>&gt; &nbsp; &nbsp; Sent: Saturday, July 19, 2008 10:38 AM<BR>&gt; &nbsp; &nbsp; To: Discussion of IronPython<BR>&gt; &nbsp; &nbsp; Subject: Re: [IronPython] IronPython Post 2.0 Roadmap<BR>&gt;<BR>&gt; &nbsp; &nbsp; Sanghyeon Seo wrote:<BR>&gt; &nbsp; &nbsp; &gt; 2008/7/20 Harry Pierson &lt;<A href="mailto:Harry.Pierson@microsoft.com">Harry.Pierson@microsoft.com</A><BR>&gt; &nbsp; &nbsp; &lt;mailto:<A href="mailto:Harry.Pierson@microsoft.com">Harry.Pierson@microsoft.com</A>&gt;&gt;:<BR>&gt; &nbsp; &nbsp; &gt;<BR>&gt; &nbsp; &nbsp; &gt;&gt; Hosting features are all done via the DLR, so that's a separate<BR>&gt; &nbsp; &nbsp; team. As for<BR>&gt; &nbsp; &nbsp; &gt;&gt; "ability to interact with the rest of the .Net framework", can<BR>&gt; &nbsp; &nbsp; you be more<BR>&gt; &nbsp; &nbsp; &gt;&gt; specific about what you're looking for in that space? What<BR>&gt; &nbsp; &nbsp; *isn't* IPy doing<BR>&gt; &nbsp; &nbsp; &gt;&gt; that you want it to?<BR>&gt; &nbsp; &nbsp; &gt;&gt;<BR>&gt; &nbsp; &nbsp; &gt;<BR>&gt; &nbsp; &nbsp; &gt; .NET attributes?<BR>&gt; &nbsp; &nbsp; &gt;<BR>&gt; &nbsp; &nbsp; &gt;<BR>&gt; &nbsp; &nbsp; +1 :-)<BR>&gt;<BR>&gt; &nbsp; &nbsp; Michael<BR>&gt;<BR>&gt; &nbsp; &nbsp; --<BR>&gt; &nbsp; &nbsp; <A href="http://www.ironpythoninaction.com/" target=_blank>http://www.ironpythoninaction.com/</A><BR>&gt; &nbsp; &nbsp; <A href="http://www.voidspace.org.uk/" target=_blank>http://www.voidspace.org.uk/</A><BR>&gt; &nbsp; &nbsp; <A href="http://www.trypython.org/" target=_blank>http://www.trypython.org/</A><BR>&gt; &nbsp; &nbsp; <A href="http://www.ironpython.info/" target=_blank>http://www.ironpython.info/</A><BR>&gt; &nbsp; &nbsp; <A href="http://www.theotherdelia.co.uk/" target=_blank>http://www.theotherdelia.co.uk/</A><BR>&gt; &nbsp; &nbsp; <A href="http://www.resolverhacks.net/" target=_blank>http://www.resolverhacks.net/</A><BR>&gt;<BR>&gt; &nbsp; &nbsp; _______________________________________________<BR>&gt; &nbsp; &nbsp; Users mailing list<BR>&gt; &nbsp; &nbsp; <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> &lt;mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>&gt; &nbsp; &nbsp; _______________________________________________<BR>&gt; &nbsp; &nbsp; Users mailing list<BR>&gt; &nbsp; &nbsp; <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> &lt;mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>&gt;<BR>&gt; &nbsp; &nbsp; _______________________________________________<BR>&gt; &nbsp; &nbsp; Users mailing list<BR>&gt; &nbsp; &nbsp; <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> &lt;mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>&gt; &nbsp; &nbsp; _______________________________________________<BR>&gt; &nbsp; &nbsp; Users mailing list<BR>&gt; &nbsp; &nbsp; <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A> &lt;mailto:<A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A>&gt;<BR>&gt; &nbsp; &nbsp; <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>&gt;<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Users mailing list<BR>&gt; <A href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</A><BR>&gt; <A href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target=_blank>http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</A><BR>&gt;<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>