Future of D

Max Haughton maxhaton at gmail.com
Sun Dec 13 21:17:00 UTC 2020


On Sunday, 13 December 2020 at 20:35:15 UTC, H. S. Teoh wrote:
> On Sun, Dec 13, 2020 at 07:33:30PM +0000, Max Haughton via 
> Digitalmars-d wrote: [...]
>> I really think properly killing the GC would give us a big 
>> boost in fresh blood to the community. It would still be 
>> there, but it's a huge turn off to new users.
>
> Honestly, IMNSHO the anti-GC crowd is only a vocal minority.  
> For most normal applications the GC is actually a big plus.  
> (And I say this as someone coming from a strong C/C++ 
> background who used to hate anything GC-related.)  It 
> eliminates an entire class of bugs that are extremely 
> time-consuming to debug and work around, and cleans up your 
> internal APIs in a significant way that allows clean 
> integration of a lot of components, without constantly having 
> to fiddle with low-level memory allocation details at every 
> turn.
>
> And I'm almost 100% certain that if D were to eliminate the GC 
> tomorrow, we would not see a big increase in users -- the 
> naysayers will merely move on to the next thing to hate.  
> Probably the lack of native refcounting / borrowing support.  
> Or the state of `shared`.  Or any of various favorite whipping 
> boys that we love to pick on.
>
>
> T

Oh, I agree. Having the GC is mainly a PR problem, but we 
absolutely do need a real alterative. We should aim to be closer 
to Rust than C++. FWIW I would never get rid of it completely but 
I also don't think ours will ever be good enough to really 
challenge RC.

Borrowing is definitely doable, @live is a start but we need to 
be able to (say) invalidate an immutable range when it's data 
changes.

Shared is probably the "easiest" to fix economically, but 
requires very subtle specification work.


More information about the Digitalmars-d mailing list