Proposal: user defined attributes

Walter Bright newshound2 at digitalmars.com
Sat Mar 17 19:53:00 PDT 2012


On 3/17/2012 7:04 PM, Manu wrote:
> On 18 March 2012 03:48, Walter Bright <newshound2 at digitalmars.com
> <mailto:newshound2 at 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?



More information about the Digitalmars-d mailing list