How I use D
Mathias LANG
geod24 at gmail.com
Mon Jun 29 12:47:00 UTC 2020
On Monday, 29 June 2020 at 09:09:14 UTC, Cym13 wrote:
> The original "Phobos is cool" thread encouraged me to share my
> experience.
Thanks a lot for sharing ! It's great to see a balanced post by a
serious user.
You mentioned a few times that you don't bring much value back to
the language. I don't really think that matters, as it's just
natural that most people use tools without contributing to them,
even in OSS. As someone having invested a ridiculous amount of my
time in D, I surely don't blame anyone for not choosing the same
path. But if you even mentioned D to a couple of your colleagues,
that's a good contribution, in my book.
> The difference with D is that I can start very scripty, using
> no explicit type, then adding details in once I have a strong
> skeleton. I know that style is often dismissed by more
> industrial users but it's one of the core reasons why I use D.
At one of the DConf, there was a panel asking: "What do you love
about D ?"
Suggestions were made, and people voted, unfortunately I cannot
seem to find the talk anymore. If memory serves me well, what
made it to the top of the list was "Fast prototyping". And as an
industry user (and a programmer by trade), I find the same
advantages apply: We're working on a blockchain project, and the
ability to prototype quickly, and iterate through multiple ideas
/ improvements without too much trouble is amazing.
I'm curious, given your use case, how did you feel about @safe by
default ?
> The only time where I had some issues were that time I wrote a
> Windows trojan in D. I needed to do some pretty convoluted
> stuff to load my code in just the right way to avoid
> antiviruses and it wasn't fun to do it in D. Cross-compiling
> this proved another hurdle. It would have been easier in C++
> directly. But I can't very well blame anyone not to make
> malware development easier and none of the issues I had should
> impact normal development.
If I understand correctly, you're using Linux + DMD ? Have you
tried LDC ? It should make those use cases much easier (past the
initial getting used to it, but you can just `alias dmd = ldmd2`).
> The low number of native libraries is not ideal. Yes, I can use
> a C library or port it from another language but I've generally
> got less than two days to work on a project. Any time spent on
> this is time not spent on actually solving the problem.
Have you tried https://github.com/jacob-carlborg/dstep ? Did you
encounter any issue ?
> For the same reason I am a huge advocate of battery-included
> stdlib. I know many are of the opinion of moving as much as
> possible from Phobos into dub. For me any library that isn't
> in dub is one more library I have to evaluate, try, keep track
> of when they update. It's lost time. Huge projects can have a
> mindset of "we'll manage our own version anyway" but my
> projects are written in a few days and are useful a week or two
> at most. So go Phobos, go! We also need lots of libraries but
> that is the kind of things that is built upon a strong standard
> library, not at its expense.
Out of curiosity, if you have used Go extensively, was the
solution they came up with (Github URL) good enough for you use
case ?
More information about the Digitalmars-d
mailing list