[IronPython] ValueTypes

Aaron Leiby fireonyoursleeve at hotmail.com
Wed Mar 7 20:27:31 CET 2007


Just started using IronPython - playing with XNA.

Digging up a couple old threads:
http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2006-May/002265.html
http://lists.ironpython.com/htdig.cgi/users-ironpython.com/2005-May/000651.html
etc. and
http://channel9.msdn.com/wiki/default.aspx/IronPython.ValueTypes

Can new value types (i.e. structs) be declared in IronPython?  If so, what 
defines the data layout.  Like for instance if I want to create a new 
VertextDeclaration.

What's the current status of a[i].x = n?  Well, the current status is it 
throws an exception warning you that it cannot be modified.  What's the 
proper way to update elements in an array?  Is it possible to do without 
replacing the entire element?  I'm currently using a.SetItem(i, 
Element(a[i].UnchangedValues, n)).

For now, I've moved my vertex declarations back into C#, and since I care 
about performance in the update loop, I should probably push that back into 
C# as well, avoiding these issues entirely.

There's no way to partially implement a class across the language 
boundaries, is there?  (Since they would need to span assemblies?)  Anything 
that needs to get pushed back to C# for performance reasons will need to 
have any required member data pass along, correct?

Thanks for bearing with these newb questions. 




More information about the Ironpython-users mailing list