On 3/17/2012 7:04 PM, Manu wrote:
On 18 March 2012 03:48, Walter Bright <newshou...@digitalmars.com
<mailto:newshou...@digitalmars.com>> wrote:
On 3/17/2012 6:39 PM, Manu wrote:
I'm sure C# already answers all these questions. It has precisely the
same set
of issues associated.
C# doesn't have RAII, immutable, nor the notion of threadlocal/shared types.
C# has immutable.
No, it does not.
How does RAII cause a problem here?
Generally, supporting it tends to permeate the semantics of the language. Simple
things like copying a value onto the parameter stack entail all kinds of issues.
The threadlocal/shared stuff shouldn't be a problem, since the attribute
instances are contained by the class its self, it just has the same locality
properties. Can you imagine a case where that would be problematic?
If it's shared, how is access to the data controlled if multiple threads access
it at the same time?