Re:Why I use the D programming language for scripting
by destructionator on Sunday July 30, 2023 @10:04AM
(#36931237)
What I like about D is if you already know it, it can adapt to just about anything you want, from these kind of shorter "scripts" to experimenting on bare metal to regular applications.
But yeah, if you already know ruby and python and perl and awk and the unix shell, there's not much to be gained in these examples. Just if you don't know those things and know a little D, it can meet you where you are and take you where you're going.
Re:Why I use the D programming language for scripting
by garrisonhh on Sunday July 30, 2023 @11:13AM
(#36932001)
You can say that about most general purpose compiled languages. I guess I don't see why I would use D for any particular compiled use case over something like zig or rust? and if I just want to script system tasks I'm going to use popular languages with popular libraries and full batteries like python
Checking the examples, my friction here is... why should I introduce a new language for those things?
First example program equivalence:
Second program equivalence: It takes to me more time, to understand what is doing D, even if theres is a previous explanation, that write down the equivalence with known tools.The last example needs to download/install dependencies, from the outside of the upstream software origins of my servers (that's a no-no in many places). apt-cache search vibe is no good for me.
If I could have need a program like that simple web example, nowadays I could go with golang, compile and deploy.
But the first two other solutions that come to my mind...
Or something like... I know that apt-get install libmojolicious-perl or install python3-flask is not an issue in many internal audits we did pass. Perl an Python are already present in the servers... or if puppet is in use, maybe ruby? But I know many places were adding new languages, using external package repositories for scripting languages, etc, is a problem...So, if it's for that article, I'm not 100% convinced to switch to D or invest my time in it... maybe I'm not the target audience.
I've nothing against D itself, but I need better marketing to be attracted.