Doesn't GC, @nogc, safe, nothrown, * get in the way of getting things done?

Paulo Pinto pjmlp at progtools.org
Thu Jun 11 12:03:56 UTC 2020


On Thursday, 11 June 2020 at 11:28:07 UTC, aberba wrote:
> In D we have so many programming models and I'm noticing this 
> has become a problem in itself.
>
> For a example should a new HTTP library become safe, or unsafe, 
> gc or no gc? Template or no templates, reference counting?? 
> @live??
>
> So unless its a third party library deciding to go with 
> whatever they want, its going to end up in an immposible to 
> match up to the technical expectations of everyone.
>
> Phobos is a mix of several models which sometimes fight against 
> each other. And this never gets solved cus its impossible.
>
> What becomes the ideal trade-off??

 From my point of view, as I approach this in D and other managed 
languages.

By default safe with GC, profile and optimize where required with 
@nogc and other similar allocation free techniques.

Unsafe code blocks only as last resort or dealing with OS APIs.

On my case, I seldom need to do otherwise, performance is more 
than acceptable to meet customer requirements. I don't care about 
winning micro-benchmarks, rather happy customers.

Your millage may vary.


More information about the Digitalmars-d mailing list