How I use D

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jun 29 19:39:19 UTC 2020


On Mon, Jun 29, 2020 at 07:13:23PM +0000, Dukc via Digitalmars-d wrote:
> On Monday, 29 June 2020 at 09:09:14 UTC, Cym13 wrote:
[...]
> Your way of use is IMO just as important as the large-scale way. D is
> officially trying to be a scripting language among it's other merits,
> which means that you're using it just as it's meant to be.

I've found IME that D is very amenable both to scripting-like tasks and
larger scale applications.  In fact, it can easily start out as a
throwaway script that morphs itself over time into something more
permanent.  D has that rare balance between easy enough for scripting
tasks, and powerful enough to tackle larger-scale applications -- and
providing the expressiveness for a pretty smooth to transition from one
to another.


> And you are not alone. While I do long-term projects, there is use for
> scripting every now and then. I transitioned from Windows to Linux an
> year ago, but I still have not learned to do anything complex with
> Unix scripts.  So when there's mass file handling to be done, I'm
> likely to roll a D script. Also I did succesfully use the D compiler
> as a simulator for a school assignment that wasn't even intended for
> programmers.

I consider myself a Linux veteran (I live on the command-line, avoid
GUIs like the plague), and I've to say, except for the simplest of
scripting tasks, I would not use shell scripts. The syntax is full of
inconsistencies and gotchas, and the shell is overly-eager to expand
things leading to Leaning Toothpick Syndrome (you have to escape the
escape character, often many times).

For anything more complex, D's std.process r0x0rs the boat. I highly
recommend it.


T

-- 
One reason that few people are aware there are programs running the internet is that they never crash in any significant way: the free software underlying the internet is reliable to the point of invisibility. -- Glyn Moody, from the article "Giving it all away"


More information about the Digitalmars-d mailing list