a design flaw in DIP1035, its remedy, and the implication for @system variables
Dennis
dkorpel at gmail.com
Wed Apr 13 12:49:05 UTC 2022
On Wednesday, 13 April 2022 at 12:14:53 UTC, Zach Tollen wrote:
> Finally, it dawns on the compiler writers that they've been
> abusing the user the whole time. They already knew, from the
> moment the variable was declared, that there was going to be a
> problem. They had an unsafely-initialized variable. They should
> have forced the user then and there to say whether it was
> `@trusted` or `@system`.
extern variables should be rare in D, they're usually the result
of translated C code. Translated C code isn't `@safe`, so has no
problem accessing `@system` variables. Introducing forced
attributes seems more annoying to me than inferred `@system`
variables.
More information about the Digitalmars-d
mailing list