On Thu, Oct 29, 2020 at 4:13 PM H. S. Teoh via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:

>
> But why can't that be treated differently from explicitly writing @safe
> on a declaration?  I mean, yeah, it's easier to implement the compiler
> that way, but ease of implementation shouldn't count against proper
> language design!
>
>
> T
>
> --
> Doubt is a self-fulfilling prophecy.
>

But what about this:

shared {
    some_ type some_var;
    immutable int x = 1;
}

There are many ways to define it and last time when I was looking at how
this is implemented in D frontend it was implemented as a bitmask variable
and you have no context from where it comes.
So only way would be to disallow this within lexer which I do not see as a
good options

Reply via email to