Can anyone provide an example of how D templates are overridable by global symbols?

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Jan 29 00:52:10 UTC 2022


On Sat, Jan 29, 2022 at 12:17:49AM +0000, Siarhei Siamashka via Digitalmars-d-learn wrote:
> On Friday, 28 January 2022 at 23:43:00 UTC, H. S. Teoh wrote:
> > You don't have to rely on any opinions. Try it out yourself and find
> > out for sure.
> 
> I guess, my problem and the source of all confusion is that I'm way
> too used to developing C++ code. And in the C++ ecosystem your
> recommendation is a recipe for disaster. It's absolutely necessary to
> have perfect understanding about what's going on and which guarantees
> are provided. Accidentally relying on undefined behavior will
> backfire, because [Murphy's
> law](https://en.wikipedia.org/wiki/Murphy%27s_law) is unfortunately
> very real.

Trying out what I suggested on different OS's and toolchains will give
you a good idea of what's actually out there.


T

-- 
If lightning were to ever strike an orchestra, it'd always hit the conductor first.


More information about the Digitalmars-d-learn mailing list