On 10/10/13 12:33 AM, Jonathan M Davis wrote:
I honestly don't think we can solve it a different way without completely redesigning shared. shared is specifically designed such that you have to either cast it way to do anything with it
no
or write all of your code to explicitly work with shared, which is not something that generally makes sense to do unless you're creating a type whose only value is in being shared across threads.
yes
Far more frequently, you want to share a type which you would also use normally as a thread-local variable, and that means casting.
no Andrei