[dmd-concurrency] is shared going to be a type modifier?
Andrei Alexandrescu
andrei at erdani.com
Thu Jan 7 10:16:16 PST 2010
Yes, shared is a type qualifier. For the most part it behaves like
immutable. Note that you can define an immutable member of an otherwise
mutable type.
Andrei
Steve Schveighoffer wrote:
> I'm not quite understanding everything being discussed here, because I came into this discussion quite late, but is shared going to remain a type modifier?
>
> People are mentioning shared as a storage class on member variables, but I thought shared was going to be like const, where it transitively affects all members. I thought a shared member function is one which the 'this' pointer is marked as shared, similar to a const function. If that's the case, aren't all unmarked variables in a class shared? Why the need to mark them? And how do you have a 'partially shared' class where some members are marked shared and some are not?
>
> I'm really confused :)
>
> -Steve
>
>
>
>
> _______________________________________________
> dmd-concurrency mailing list
> dmd-concurrency at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
More information about the dmd-concurrency
mailing list