6 ms·
What is the type of apps that one should use D for ? I think this is one of the main issues with languages that did not gain traction and that is they are too g
by theredbox 7y ago
What is the type of apps that one should use D for ?
I think this is one of the main issues with languages that did not gain traction and that is they are too generic and try to be too many things to too many people.
If i exclude the financial backing i think languages that tried to tackle one specific thing did rather well. Rust came to be to address the issue with security and there is not really an alternative. Yes people use it for cli tools or backend services but that’s just because they are riding the hype train.
The same with Go.
On the other hand we have things like Dart which did not really try to solve an issue people felt they have.
The same with Crystal.
Nobody really needed faster Ruby that much and if they did they already needed a production ready solution which was just too hard to deliver.
A language like Nim reminds me of D. Its author is also a brilliant Phd CS person but I feel like he does not really have a problem to solve. It’s all just an intellectual challenge. Companies like Status.im ( backer of Nim ) have a problem that they are trying to solve by using Nim. Making the right and the perfect solutions is hard but this evolutionary approach is really harming the expansion of the ecosystem. Nim has just too many features and too many approaches to memory management (recent gc:arc release). But it is all too half baked and does not support the features Nim advertises that it has.
This is basically the same issue i have with D. I have no idea what I would use D for. And could i rely on D in the domain i pick it for ?
Eg the same field where Go excels.
- vmchale 7y ago> Rust came to be to address the issue with security and there is not really an alternative. Yes people use it for cli tools or backend services but that’s just because they are riding the hype train. I like Rust for CLI tools because it takes some nice ML features and it handles strings sensibly.
- jane_red 7y agoLast time I tried to install a Rust-based cli network tool it took literally 4 min to compile it! Seriously, 4 minutes for something that monitors your network load. If this is what it takes to make a cli tool, I'd rather do it in plain BASH :)
- deleted 7y ago[deleted]
- vips7L 7y agoStrings in Rust are the first time I ever got confused about what a String was. It might be sensible, but it's not easy.
- pjmlp 7y agoYou could do the same with OCaml.
- WalterBright 7y ago> Rust came to be to address the issue with security and there is not really an alternative. That will change in the coming months. > I have no idea what I would use D for. And could i rely on D in the domain i pick it for ? D is a general programming language. You can use it for scripts, number crunching, UI, and everything in between. It's been around a long time, and is part of the gcc collection.
- vmchale 7y agoI think the gcc backend is quite attractive! rustc still has some cases it doesn't catch the optimizations gcc does.
- 7thaccount 7y agoWalter, I love your language conceptually as it runs fast and has a simple command line compiler (no .net framework hell or Java .jar madness). However, most of my experience is with Python, Perl, Bash...etc. So I don't have a lot of Java, C#, C++ experience. With D, this sometimes bites me as all the doc seems to assume I'm familiar with that world. There is that one beginners book which is cool, but it only covers the absolute basics and I still get confused traversing stdlib. Still, Thank you for all the work you've put in over the years!
- petre 7y agoI found D quite easy to pick upcoming from a Perl and Js background. One could get up to speed quite fast and it has a plethora of language features that will get you engaged for years to come, as opposed to Go which keeps the language as simple as possible.
- bachmeier 7y agoThere are a lot of places D does well, but if I had to pick one for which it is ideally suited, I'd say replacing C on a Linux/Mac/Windows desktop for app development or scientific computing. C is simply obsolete in those domains since D offers basically a superset of the functionality. In terms of interoperability, you can even #include C header files.
- jane_red 7y agoUnfortunately with scientific computing the only place I see D could be writing custom performance critical algorithms but then again for university folk it is more straightforward to do it in C++ or C since there are plenty of code snippets lying around. There is excellent mir library but its documentation is subpar, no tutorials or any examples too. There is Netflix Vectorflow small deep learning library but only for CPU and only feed-forward networks, so it works for some specific narrow case. There is fastest on earth csv parsing library TSV-utilities from one of the ebay engineers but I have only learnt about it when I started looking through D website resources, also no tutorials. There are tools but using them needs more time investment than alternatives.
- bachmeier 7y agoI actually have quite a lot of tools available that I've built up over the years. I wish I had more time to work on it. I have a matrix algebra library that in my opinion is extremely convenient to use that I'm preparing to release complete with documentation in the next couple months. I have everything available in R at my disposal, because it's easy to embed an R interpreter inside a D program. Note that this does not always give poor performance, because the R code calls into compiled code or you can just call the compiled code directly using the R interface. For numerical optimization, I call the R optimization routines directly (i.e., the C library functions). For basic model estimation, I call the Gretl library. For statistical functions (evaluating distributions and such) I can call into the R API or Gretl. For random number generation, I can call into Gretl, R or GSL. I have parallel random number generation code that I ported from Java. For machine learning (I do a limited amount like lasso) I call R functions. The overhead with that is so low that there's no point in not just calling the R functions directly. So things are there. It's just a matter of finding the time to turn it into something others can use. Right now I'm focused on doing that with my linear algebra library.
- jane_red 7y agoApplicability is not the main issue. D can be used for anything where speed matters, gamedev, data processing, machine learning, kernel programming. It is not a niche language. But as it is always with low profile languages that grow out of a sheer hobbyist talent and not backed or picked up by big companies it remains in its own humble world for years. On top of that D was unfortunate to have some pretty rough early period with transition from D1 to D2, two standard libs, several compilers, etc. etc. All this would not be an issue given there were hired teams working on it and big enough community. It all worked well against D. However, lurking around D forums and available libs left me with a good impression. Yeah, some tooling is missing and might be rough around the edges but there is plenty of work if you want to get your hands dirty. In addition D has a very helpful community of very skilled engineers imho (something I sometimes miss in other languages...).
- pjmlp 7y ago> Rust came to be to address the issue with security and there is not really an alternative. Ada has been an alternative since 1983. Oberon was an alternative in 1992. Modula-3 was an alternative in 1988. And while they don't fix use after free, Object Pascal dialects, Modula-2 have been better options to C in safety terms since ages. What Rust has coming for it, is being on the forefront bringing affine types into mainstream languages and being more appealing to younger generations than a language like Ada. This doesn't mean Rust is here to take it all. In fact, I don't have any specific use case where Rust would excel, AOT compiled languages with value types and automatic memory management fulfill much better my use cases.
- p0nce 7y agoD can be used for almost everything: this is indeed a marketing message that is harder to pass than "Language X is made for problem Y". For example I do signal processing, and D is surprinsingly pleasant for it since it has builtin complex numbers. Being well-balanced, generic, readable, productive, and performant seemingly doesn't convince more than "this solves problem Y". Probably why marketers use segmentation. But at the end of the day, more power is more power and every specialized language tend to become general-purpose.
- EvenThisAcronym 7y ago> Rust came to be to address the issue with security and there is not really an alternative. What does Rust have to do with security? It's not even compliant with any modern security standards (at least not that I'm aware of). > I have no idea what I would use D for. This makes no sense. D is a general-purpose language, just like Rust, Nim and Go (and it does concurrency better than Go, IMO). It just happens to be the best general-purpose language that I've ever used. The language gets out of your way and lets you focus on solving problems in the domain you're working in.
- aratakareigen 7y agoYou're being too reductionist. In the specific case of Rust, no security is not its primary strength. In fact, it has no standard and a few soundness issues, and I'm not sure what certifications it has, so this makes little sense. What Rust does have is very impressive. It has a type system that can express a very large subset of data race-free and memory safe programs. It's one of the few languages to get strings right. It has a fantastic package manager. It has destructors, so no more "defer f.Close()". It has sum types, so your state machines actually look like state machines, and "if err != nil { return err; }" is just "?". Most of these features aren't unique to Rust at all, but their combination definitely is, so I hope this unintentional advertisement explains why "cli tools or backend services" developers like Rust.