What are (were) the most difficult parts of D?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri May 13 19:03:08 UTC 2022


On Fri, May 13, 2022 at 06:29:54PM +0000, Adam D Ruppe via Digitalmars-d-learn wrote:
[...]
> Yeah, I used to be pro-TLS by default, then got bit by it several
> times and moved to the fence, and now I'm anti.
> 
> Data races aren't actually prevented by it (maybe forcing you to
> specify shared or tls would at least get you think about it though)
> and lots of things mysteriously fail if you forget about it.
> 
> You can lock the variable and everything and it still null cuz it was
> tls the whole time. Oops.
> 
> This a case where I think forcing explitness would be better than
> either default, but failing that, tls by default is the more-bad
> choice.

Personally I prefer avoiding globals at all. :-P  But OK, sometimes you
can't work around it (or it'd be too onerous).  I guess maybe that's why
I haven't been bitten by TLS so far. Hardly ever use it. :-D


T

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next. -- (Stolen from the net)


More information about the Digitalmars-d-learn mailing list