October 26, 2011
> void main() {
>     shared s1 = cast(shared)new S();
>     s1.onlyShared(); // ok
>     //s1.notShared(); // error: not callable using argument types () shared
>     auto s2 = new S();
>     //s2.onlyShared(); // error: not callable using argument types ()
>     s2.notShared(); // ok
> }

I would rather prefer "auto s1 = new shared(S);" because "shared s1 =
new S();" seems to allocate a TLS variable which is then casted to
shared which is actually non-TLS.
November 08, 2011
Am 23.10.2011, 21:51 Uhr, schrieb bearophile <bearophileHUGS@lycos.com>:

> Jonathan M Davis:
>
>> my general take on it is that dmd should _never_ ignore attributes,
>
> I agree. Such sloppiness is a very good source for problems, long term ones too, and it makes it harder to learn D.
>
> Bye,
> bearophile

+1
For example I still wonder what final does to private methods. It makes me wonder if they are virtual and I should really add this keyword to be on the safe side.
1 2
Next ›   Last »