<div dir="ltr"><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 19 Mar 2025 at 11:36, Meta via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tuesday, 18 March 2025 at 20:00:01 UTC, Maximilian Naderer <br>
wrote:<br>
> Hello guys,<br>
><br>
> Not sure if you are aware a pretty big Streamer made a video <br>
> about D!<br>
><br>
> Not that it’s important for me but he is really impressed with <br>
> the language and was blown away a couple of times.<br>
><br>
> <a href="https://youtu.be/Gj5310KnUTQ?si=rSP50Uf9oeb4vLm1" rel="noreferrer" target="_blank">https://youtu.be/Gj5310KnUTQ?si=rSP50Uf9oeb4vLm1</a><br>
><br>
> Best regards,<br>
> Max<br>
<br>
"This language is garbage collected, and they're _fucking <br>
ashamed_ of that!"<br>
<br>
This guy is surprisingly perceptive and 100% accurate with his <br>
cutting observations hahaha.<br>
</blockquote><div><br></div><div>Why didn't his operator overloading experiment work?<br><br>struct S {<br>    int x;<br>}<br></div><div><br></div><div>// non-member opBinary</div><div>S opBinary(string s : "+")(S lh, S rh) {<br>    return S(lh.x + rh.x);<br>}<br><br>void main()<br>{<br>    S a, b;<br>    S s1 = a.opBinary!"+"(b); // <- UFCS works, as expected<br>    S s2 = a + b; // ERROR: doesn't work! why not? the rewrite should work via UFCS as above...<br>}<br></div><div><br></div><div> I can't imagine any good reason his experiment should have failed. I would want this too when extern to a C lib; it hasn't come up for me before, but if it did, I would log a bug instantly.</div></div></div>