C's Biggest Mistake on Hacker News

bpr brogoff at gmail.com
Wed Jul 25 20:24:39 UTC 2018


On Wednesday, 25 July 2018 at 17:23:40 UTC, Ecstatic Coder wrote:
> But don't be too optimistic about BetterC...

I'm too old to get optimistic about these things. In the very 
best case, D has quite an uphill battle for market share. Any non 
mainstream language does. If I were a betting man, I'd bet on 
Rust.

> Honestly, considering D's leadership current priorities, I 
> don't see how it could become soon a true C++ or Go competitor, 
> even with the half-baked BetterC initiative...

There are a few ways I can see, and doubtless others can see 
different ones. Here's one: use Mir and BetterC to write a 
TensorFlow competitor for use in developing and deploying ML 
models. I'm sure you can shoot holes in that idea, but you get 
the point. Try lots of things and see what works, and keep doing 
more of those things. Worked for Python.

> For instance, I've suggested they consider using reference 
> counting as an alternative default memory management scheme, 
> and add it to the lists of scolarship and crowdsourced project, 
> and of course they have added all the other suggestion, but not 
> this one. What a surprise ;)

I'm pretty sure D leadership is pursuing such things. In fact,

https://wiki.dlang.org/Vision/2018H1

rather prominently mentions it.

> Despite this is probably one of the most used allocation 
> management scheme in typical C++ development, as this 
> drastically reduces the risks of memory leaks and dangling 
> pointers...

> Anyway, meanwhile D remains a fantastic strongly-typed 
> scripting language for file processing and data analysis, and 
> its recent adoption at Netflix has once again clearly proved 
> it...

For this and similar uses, tracing GC is fine, better in fact 
than the alternatives. I'm only making noise about betterC for 
the cases where C++ dominates and tracing GC is a showstopper.

In an alternative timeline, DasBtterC would have been released 
before D with GC, and the main libraries would have been nogc, 
and maybe there'd be a split between raw pointers and traced refs 
(like Nim and Modula-3) and then maybe there'd have been no 
strong desire for Rust since D could have filled that niche.




More information about the Digitalmars-d mailing list