On Wed, Oct 19, 2011 at 9:38 PM, Robert Jacques <sandford@jhu.edu> wrote:
On Wed, 19 Oct 2011 20:51:25 -0400, Michel Fortin <michel.fortin@michelf.com> wrote:
On 2011-10-19 21:53:12 +0000, Andrew Wiley <wiley.andrew.j@gmail.com> said:

[snip]

Also, I how shared works is being misunderstood. Making a class synchronized should limit all member functions and field to being shared or immutable, but it doesn't place any limits on the argument to the member functions. So in the below:


synchronized class Thing2 {
       void doSomeWork(int i) {}
       void doSomeOtherWork(Thing2 t) {}
       void work() {}
}

i is of type int, not shared(int).


Ah, I see, so I can pass unshared data or references to unshared data into member functions, and the type system keeps me from saving them to member fields because member fields will be flagged as shared, but the arguments need not be. That makes a lot more sense.
Sorry for the noise.