On Friday, 31 March 2023 at 19:43:42 UTC, bachmeier wrote:

Those of us that have been scarred by reading FORTRAN 77 code would disagree. I use global mutables myself (and even the occasional goto), but if anything, it should be `__GLOBAL_MUTABLE_VARIABLE` to increase the pain of using them.

But you kind of get into the same things with "accidental TLS". It doesn't race, but now the variable is different for every thread, which is a different kind of race.

TLS could be explicit and we wouldn't need a -vtls flag. There is no flag to warn for every use of @trusted, so in the grand scheme of things TLS is more dangerous than @trusted.

Reply via email to