<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This is great feedback&#8230;.&nbsp; And yet another
way we could consider doing this would be something whacky with metaclasses
where we had an &#8220;attribute-aware&#8221; metaclass or something like that&#8230;&nbsp;
But it demonstrates the difficulty in adding support for features like this and
the reason we need to tread lightly here.&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=1 color=navy face="Bookman Old Style"><span
style='font-size:8.0pt;font-family:"Bookman Old Style";color:navy'><a
href="http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038">Do
you want to help develop Dynamic languages on CLR?</a> </span></font><font
size=1 color=white face="Bookman Old Style"><span style='font-size:1.0pt;
font-family:"Bookman Old Style";color:white'>(http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)</span></font><font
size=1 face="Bookman Old Style"><span style='font-size:8.0pt;font-family:"Bookman Old Style"'><o:p></o:p></span></font></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Eric Larson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, March 27, 2006 9:11
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Discussion
 of IronPython</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [IronPython] .NET
Attributes</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>On the topic of
decorators and integrating with .NET, it seems that in order to keep IronPython
as close to CPython, it would be a good idea to consider adding .NET specific
pieces as a &quot;library&quot; instead of an addition to the language. That
way people could write python code that works in IronPython and CPython equally
well without changing radically how the code is written. For example, if I
wanted to make a class serializable, it seems logical to inherit from some
serializable base class. <br>
<br>
from clr.netisms import IPSerializable<br>
<br>
class MyClass(IPSerializable):<br>
....<br>
<br>
This may be an obvious solution, but it seems to make more sense to add
IronPython specific libraries to help integrate with .NET than to pollute the
language. I mention this because one of the great things about Python is the
&quot;batteries included&quot; mentality. There are many great libraries that
would be excellent to run using IronPython (ZODB for example) that may conflict
if the language gets massaged to fit into .NET perfectly. Often times writing
to the lowest common denominator can be bad (SQL portability for example), but
I believe in the case of Python, whatever can be done to work with the massive
amount of libraries will be the most beneficial. <br>
<br>
I apologize if this is already addressed. I am thinking about issues such as
these from a python programmer's perspective.<br>
<br>
Great work!<br>
<br>
Eric<br>
<br>
<br>
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 3/27/06, <b><span style='font-weight:bold'>Dino
Viehland</span></b> &lt;<a href="mailto:dinov@exchange.microsoft.com">dinov@exchange.microsoft.com</a>&gt;
wrote:</span></font></span><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>This is a tough problem...&nbsp;&nbsp;There are two issues
here.&nbsp;&nbsp;But the executive summary here is I'd say the earliest you
should *expect* to see this is 1.1, but if (somehow) we end up with some extra
time we might have something in the 1.0 timeframe (but don't hold your breath!).<br>
<br>
The first issue here is that when your code gets compiled we don't create what
are truly .NET classes.&nbsp;&nbsp;Let's forget about old-style classes for a
second (as those are REALLY not .NET classes, and never will be) and instead
focus on new-style classes. <br>
<br>
When you define a class we'll see if anyone else has inherited from the same
set of base-types (including .NET interfaces).&nbsp;&nbsp;If someone has then
we'll use that class instead of creating a new class.&nbsp;&nbsp;If they
haven't we'll derive a new class from your base-class set, overriding all of
the virtual methods, and creating some new fields like __dict__ and
__class__.&nbsp;&nbsp;Those fields allow us to both allow you to change the
type of your classes at runtime as well as attach new properties to
instances.&nbsp;&nbsp;They also allow us to create a limited number of CLR
types (which aren't garbage collected) which means long-running programs
creating lots of types don't leak. <br>
<br>
In the end there's not really anything good for us to attach the attributes
to.&nbsp;&nbsp;To get that we'd need to move to a more static-compilation model
while at the same time retaining the ability to do all the great dynamic stuff
with Python.&nbsp;&nbsp;It's a hard problem and one that we simply haven't
solved yet. <br>
<br>
The second problem is also just as tough, but it's completely different.&nbsp;&nbsp;How
do you even express an attribute on a class?&nbsp;&nbsp;There's no Python
syntax for this so we'd have to add something new.&nbsp;&nbsp;It'd be great if
we could use decorators here, but they don't apply to classes.&nbsp;&nbsp;So
maybe that's something like __attributes__ = [Serializable, ...] or something
along those lines but it's not clear what's the best way to go here... <br>
<br>
<br>
<br>
Do you want to help develop Dynamic languages on CLR? (<a
href="http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038">http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038
</a>)<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 Andrzej Krzywda<br>
Sent: Monday, March 27, 2006 4:55 AM<br>
To: <a href="mailto:users@lists.ironpython.com">users@lists.ironpython.com</a><br>
Subject: [IronPython] .NET Attributes<br>
<br>
Hi,<br>
<br>
When there will be support for .NET Attributes in IronPython? <br>
Is there any way currently to mark my class as Serializable?<br>
<br>
--<br>
Andrzej<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">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><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>