Jim Hugunin wrote:


Because of the way that value types work, there's no difference between the results of apt[0].X = 0 and apt[0] = Point(0, apt[0].Y)

The big question is how important it is that both of the following are
equivalent.
apt[0].X = 0 and tmp = apt[0]; tmp.X = 0


Just curious, maybe I'm off base...
Is concurrency a concern here?
Can instances of value types be shared between threads? (Perhaps different languages?)
If so, what if another thread is concurrently modifying a different member of the underlying struct?


If the client code 'just changes one attribute', but in actuality the entire structure gets written back, it may make for some very hard-to-pin-down bugs.

(if this might happen, maybe immutable value types aren't so bad.)

Drew
_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to