The primary advantages are the reduced developer errors. Since it is no longer possible to modify the object, developers do not need to worry about whether a given Dimension object is being passed by reference, or by value.
The primary disadvantage is the increased creation of temporary objects in current VMs. Do you have any performance test cases that you use? I could put together some changes and see what the numbers look like before and after. On Fri, Apr 10, 2009 at 16:15, Greg Brown <[email protected]> wrote: > This seems like a reasonable change to make, though I'd like to talk it out a > bit further before we go ahead with it. It will obviously help reduce > developer error, and the stack semantics you described below will reduce heap > allocations, which is nice. Are there other advantages? What are the > drawbacks? >
