November 19, 2019
On Tuesday, 19 November 2019 at 13:01:30 UTC, Newbie2019 wrote:
> I suggest D should add a grave yard page with dead projects on this site.

This already exists, kind of: http://dsource.org/projects/


Jokes aside, I think most C++ programmers who could have made the switch away from it, did that long time ago, whether to Go, Java, C# or something else.

As for why they don't switch to D, it's mostly because it's not popular. The reason they might be switching to Rust isn't because they desire borrow checker or anything like that, most people don't care about that. But it's a language that got many things right and comes with great defaults. One package manager, one way to install, one compiler. On top of that it has solid base libraries, upon which people write higher level constructs. Also, it has a lot of popularity right now, so people can switch having confidence that the bug reports will be fixed quickly and they can find help whenever needed.

Sure, D has a lot of these features too. But for a C++ programmer, many of those features they see first time and it's amazing. Package managers never took hold in C++ world, whether it's vkpkg, conan, it's all niche. But in D, Rust, etc. people can't live without it.


November 19, 2019
On Tuesday, 19 November 2019 at 13:57:07 UTC, Pavel Shkadzko wrote:
> On Tuesday, 19 November 2019 at 13:06:29 UTC, Mark wrote:
>> In addition to what others have written, here's another thing to consider: D's "killer feature" is its metaprogramming capabilities, but I don't think most C++ programmers, rightly or wrongly, care that much about metaprogramming. I think the reason Rust hasn't replaced C++ (so far, anyway) is similar - it's killer feature is "memory safety by default" but most C++ programmers that I know don't consider (lack of) memory safety to be a major problem in the language.
>
> Sorry, could you please elaborate what do you mean by D "metaprogramming"?

Better known in the community as "Design by Introspection". See for instance:
https://tour.dlang.org/tour/en/gems/template-meta-programming
November 19, 2019
On Tuesday, 19 November 2019 at 13:06:29 UTC, Mark wrote:
> In addition to what others have written, here's another thing to consider: D's "killer feature" is its metaprogramming capabilities, but I don't think most C++ programmers, rightly or wrongly, care that much about metaprogramming.

I think library authors do, though. Anyway there are issues related to meta programming in C++, D, and Rust. But they all also improve on that for every significant version bump. Whoever stops evolving their metaprogramming features will fall behind.

Rust is getting const generics eventually and C++ has added many library features and some minor language tweaks. It would be a good idea for D to make some statements about what is coming on the metaprogramming front.

> I think the reason Rust hasn't replaced C++ (so far, anyway) is similar - it's killer feature is "memory safety by default" but most C++ programmers that I know don't consider (lack of) memory safety to be a major problem in the language.

There are certain things in rust that is verbose in Rust and that would be annoying to many C++ programmers. E.g. if you don't want to initialise a variable then you have to wrap the type in MaybeUninit<T>, and then use mem::transmute<_,T>(variable) as a cast after the variable has been initialized.

This level of safe/unsafe type system verbosity is only ok if you almost always initialise variables.

I think the default mode for many C++ programmers is to not trust the optimiser to get it right. Which can be a liability, it really depends on whether you want a primarily low level language with some high level capabilities (C++) or a primarily high level language with some low level capabilities (D and Rust).



November 19, 2019
On Tuesday, 19 November 2019 at 14:36:06 UTC, Ola Fosheim Grøstad wrote:
> Whoever stops evolving their metaprogramming features will fall behind.

Btw, Go is also actively pursuing generics now:

https://go-review.googlesource.com/c/go/+/187317/
https://blog.golang.org/why-generics

November 19, 2019
On Tuesday, 19 November 2019 at 13:01:30 UTC, Newbie2019 wrote:
>
> The question can be why C++ programmers like RUST but not D.
>
> RUST achievement:
>
> a) browser engine (firefox,  webrender)
> b) Virtualization (firecracker, rust-virtual-machine, cloud-hypervisor, railcar , vagga  )
> c) database, storage engine (tikv , PumpkinDB, sled, indradb, noria, ParityDB)
> d) Emulators / Games / Graphics / Text editors (a lot projects on github with active users)
> e) System tools (there is really a lot on github)
> f) Web developer, WASM projects
> g) betters IDEs support
> h) BlockChain (Facebook Libra, and a lot other products worth millions or billions)
> i) Android and IOS. (D has Android, but not IOS)
>
> D has similar projects for web/wasm/GUI, but with less projects activity and users.
>
> I suggest D should add a grave yard page with dead projects on this site.

I don't see Rust picking up that fast and that C++ programmers like Rust is your claim. Rust might have better support than D but that doesn't say much as both are very small compared to C++ and fringe languages. I'm used to C++ and think C++ is ugly but Rust is even worse. Take C++ meta programming and make it worse and you have Rust. Rust has gone the C++ complicated route and made even more complicated, I can't see that as a recipe for winning.

In the real world the statistics are clear, simplicity rules. Major languages like Python and Java are popular because they are experienced as simpler languages. In the real world you want to get from A to B with as little effort as possible. Rust will never pick up because of this. However, D has an edge here as it can be a simpler alternative to C++ and that is why I started to use D. It currently interesting to see all those DIPs trying make Rust out of D but if it makes the language more complicated D will lose its competitiveness.

November 19, 2019
On Tuesday, 19 November 2019 at 15:08:55 UTC, IGotD- wrote:
> In the real world the statistics are clear, simplicity rules. Major languages like Python and Java are popular because they are experienced as simpler languages. In the real world you want to get from A to B with as little effort as possible. Rust will never pick up because of this. However, D has an edge here as it can be a simpler alternative to C++ and that is why I started to use D. It currently interesting to see all those DIPs trying make Rust out of D but if it makes the language more complicated D will lose its competitiveness.

The  Microsoft, Facebook, intel, Mozilla  use Rust for billions dollar projects, I will consider that a real world Rust success case.



November 19, 2019
On 11/19/19 9:55 AM, Ola Fosheim Gr wrote:
> On Tuesday, 19 November 2019 at 14:36:06 UTC, Ola Fosheim Grøstad wrote:
>> Whoever stops evolving their metaprogramming features will fall behind.
> 
> Btw, Go is also actively pursuing generics now:
> 
> https://go-review.googlesource.com/c/go/+/187317/
> https://blog.golang.org/why-generics

Interesting they use the term "generics", it looks very much like they are putting in templates, which are vastly different from generics on many languages.

It also looks like the call syntax does not use angle brackets, but just normal parentheses, a huge win for sure.

-Steve
November 19, 2019
On 11/19/19 3:51 AM, Pavel Shkadzko wrote:
> Sorry for "clickbaity" title but I believe it is discussion inducing.
> 
> This spring I started looking into D and trying it for some of the data analysis and scripting tasks. So, I am fairly new to the language and all its toolset (mainly using Python and Scala at work). I don't know C++. We do however have C++ engineers so I asked them around. I was quite surprised that none of them knew or even tried to use D. They of course heard about the language but that's it.
> 
> This Friday I also attended a PyTorch meetup in Munich at Microsoft where one of the core PyTorch developers (Adam Paszke) made a presentation about the future of this deep learning library. During presentation he mentioned that he played around with Hasktorch (a PyTorch inspired library in Haskell) to see how does PyTorch concepts go with functional style. When I approached him after the talk and asked if he ever thought of trying D for that purpose he looked surprised and confessed that he didn't know the language, heard about it yes but it never occurred to him to try and use it.

I think it pretty much has to do with
1. what can I get my employer to accept as a language to use and
2. How easy is it to interface with my existing code base.

I think the complaints about the GC are way overblown, they are the "Never" crowd. E.g. the ones who will never choose D for whatever reason. If you fix that reason, they'll find another one. Yes, I know there are certain places where the GC is no good for that domain (e.g. AAA games), but there are much more important problems to solve for those domains (i.e. atomics and lock-free message passing), and we do give tools to prevent GC usage (@nogc and betterC).

But on my first point above, not many will accept D as a language to base their company on. The ones who do seem to have shined through with success stories (Sociomantic, Weka, Symmetry), but it's just less risky to use C++ in many minds.

On the second point, we need to get to a place where via tools (dpp) or compiler adjustments (extern C++) we can interface NATIVELY with existing C++ code. One of the most important revelations from Atila, who is obviously a VERY pro-D person, is when he still picked C++ for a project at the company he worked for despite having sole discretion over whether to use D or not. He did it because all the code was already C and to do it in C++ means "I just can include the headers I need". For D, he would have to port much of those headers to D by hand.

We are getting there. And honestly, I'm fine with D being it's own thing and not attracting huge swaths of C++ programmers. They'll figure it out eventually, and there is something to not chirping about how much better D is than C++ when sometimes the initial experience can be so negative on your expectations (stories I hear all the time from pro-D people who convinced coworkers to try out D).

I think we are best off not lamenting about the lack of C++ immigrants.

-Steve
November 19, 2019
On Tuesday, 19 November 2019 at 16:11:00 UTC, Steven Schveighoffer wrote:
> Interesting they use the term "generics", it looks very much like they are putting in templates, which are vastly different from generics on many languages.

Well, I don't know. Seems like they haven't quite decided on the semantics, but implement it in order to get feedback on actual use.

The umbrella term is «generic programming», so templates is perhaps more like a special case of generics. Also, it could create C++ like expectations, perhaps. I assume they will go for something simpler.

November 19, 2019
On Tuesday, 19 November 2019 at 10:57:20 UTC, Russel Winder wrote:
> On Tue, 2019-11-19 at 09:28 +0000, bachmeier via Digitalmars-d wrote:
>> 
> […]
>> Unfortunately, D is not a better C++. Most notably, it has a GC, and much of the functionality of the standard library has historically required using the GC. Second, it doesn't work with legacy C++ code. That's changing, but it's a big issue.
> […]
>
> That many C++ developers have an obsessive fear of the words garbage collector is clearly an issue, independent of whether GC is actually an issue for their codebases.

There's a bit of a sample selection issue. Anyone open to GC moved to Java long ago. These days anyone still using C++ either has a good reason to fear the GC (certain real-time applications) or an irrational fear of the GC. The D of today would have had great success at recruiting C++ programmers 20 years ago, but by about 2005 or so, Java had already sucked up all the potential converts.