<div dir="ltr"><div dir="ltr">On Thu, Dec 17, 2020 at 4:45 PM Jessica Smith via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm a python programmer closing in on 5 years of working with the <br>
language. I've dabbled in a fair number of other languages but <br>
Ive always come back to python.<br>
<br>
I have some experience working with c, but that's only through <br>
college projects. I wanted to pick up another systems programming <br>
language. Something fast and close to the metal. I chose d.<br>
<br>
The first thing that struck me as a potential pain point was the <br>
fact that d had very few libraries. It's community is a bit <br>
unresponsive. Some might say even comatose.<br>
<br>
I wanted to start by implementing a DNS server. So I checked to <br>
see if there was a DNS library I could use. D didn't have one <br>
that would fit the bill. At this point, I was wondering if rust <br>
or nim would make more sense. I dismissed both those languages <br>
early on cause of their respective syntaxes. They are not <br>
aesthetically pleasing to me. Somehow, d made sense.<br>
<br>
Here's where things got interesting.<br>
<br>
There is an excellent c library called ldns which powers the <br>
drill cli. I wanted to use that. Here's how you do this in d:<br>
<br>
Write an equivalent d file that mimics the header file of the c <br>
library you want to call into.<br>
<br>
Call the function<br>
<br>
WTF! D doesn't need extensions cause you can just use the c ones. <br>
Suddenly it feels like d has all of the plugins in the world as <br>
opposed to like three barely maintained libraries.<br>
<br>
I wanted to speed up a python app at work. Primary motivation <br>
behind picking up another language. d can fit in and just work <br>
with python as if I had written an actual c extension library. I <br>
get optional gc, type checking and speed. This is hands-down the <br>
coolest thing I have experienced. Suddenly d makes a lot more <br>
sense.<br>
<br>
<br>
<a href="https://wwwrouterlogin-net.com/" rel="noreferrer" target="_blank">https://wwwrouterlogin-net.com/</a> <br>
<a href="http://amped-ampedwirelesssetup.net/" rel="noreferrer" target="_blank">http://amped-ampedwirelesssetup.net/</a> <br>
<a href="https://tplinkwifinet-login.com/" rel="noreferrer" target="_blank">https://tplinkwifinet-login.com/</a></blockquote><div><br></div><div>Hooray! That is indeed the goal of investing in C/C++ compatibility. It's meant to be an enabler, and it's nice to be aware of anecdotal cases where that occurs.</div><div>It's often exclusively seen as using existing C stuff in your D apps, but it's also the case that you can use D in gaps where C/C++ could only fit previously (like your python extensions), the number of such use cases is innumerable.</div><div>To be fair, most languages have some form of extern(C), but we have done a good job to make sure it's really useful and (mostly) easy.</div></div></div>