Having TLS by default is actually quite desirable if you like your code to be safe without having to do anything extra.

As soon as you go into global to the process memory, you are responsible for synchronization. Ensuring that the state is what you want it to be.

Keep in mind that threads didn't exist when C was created. They could not change their approach without breaking everyone's code. So what they do is totally irrelevant unless its 1980.

I think its the correct way around. You can't accidentally cause memory safety issues. You must explicitly opt-into the ability to mess up your programs state.
  • Why are globals ... ryuukk_ via Digitalmars-d-learn
    • Re: Why are... ryuukk_ via Digitalmars-d-learn
    • Re: Why are... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Why... ryuukk_ via Digitalmars-d-learn
        • Re:... Nick Treleaven via Digitalmars-d-learn
          • ... ryuukk_ via Digitalmars-d-learn
      • Re: Why... IGotD- via Digitalmars-d-learn
      • Re: Why... IGotD- via Digitalmars-d-learn
        • Re:... Guillaume Piolat via Digitalmars-d-learn
    • Re: Why are... Nick Treleaven via Digitalmars-d-learn
      • Re: Why... ryuukk_ via Digitalmars-d-learn
        • Re:... Nick Treleaven via Digitalmars-d-learn
        • Re:... Nick Treleaven via Digitalmars-d-learn

Reply via email to