On Sat, Mar 04, 2017 at 09:06:52AM +0000, Rico Decho via Digitalmars-d wrote: [...] > Unfortunately C++ developers generally have to use this language in > cases where garbage collected languages like Java and C# wouldn't be > used. > > So D's garbage collector may be a problem to convince most C++ > professional developers, and D may not seem enough of an improvement > for most Java/C# professional developers.
Ah, the good ole GC phobia. It was somewhat of a deterrent to me in the beginning too, I admit, but honestly, in retrospect, a lot of the GC phobia among the C/C++ crowd (including myself at the time) amounts to nothing more than unfounded prejudice, mostly stemming from initial impressions of the original GC in Java which was very sucky and had all sorts of problems. Modern GCs addressed most of these problems. Now, it's true that D's current GC needs a lot of improvement, but it really isn't as bad as people seem to think it is. For most applications, it's actually liberating to be able to finally stop thinking about the nitty-gritty of memory management at every turn, and to be able to focus on the actual algorithms at hand. It does require a different mindset than when you're writing C++, though, so this may not click for a while at first. It's actually rather rare to *need* to avoid the GC -- only niche applications need that, like if you're writing a game engine that has to avoid stop-the-world pauses (which can be easily worked around, btw), or real-time medical applications where if it stops for 10ms somebody dies. 90% of real world programs out there work just fine with the GC. IME, many C/C++ folks' GC aversion are actually more religious than anything else. I know C coders who swear against ever using any sort of GC, but then go ahead and (re)invent their own form of GC, albeit full of bugs, design flaws, and nasty unhandled corner cases that real GCs avoid. But of course, they'd never admit that their design was inferior, because GCs suck by definition, and therefore even their most flawed memory management designs must necessarily be better. T -- Why have vacation when you can work?? -- EC