Life in the Fast Lane (@nogc blog post)

Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Jun 17 10:39:01 PDT 2017


On Saturday, 17 June 2017 at 16:59:56 UTC, Dukc wrote:
> If that Walter's DIP about reference-counted exceptions gets 
> trough it should ease problem like that quite a bit.

Possibly. There's a lot of solutions to the exception thing 
though, and it doesn't actually bother me if you see @nogc as 
being very niche because you can just use one of those solutions 
today. (most of them depend simply on the catching code calling 
some disposal function, or living with a (possibly temporary) 
leak. Aside from that, the *most* you have to do is just `throw 
make!Exception` instead of `throw new Exception` and problem 
solved).

> Didn't Don Clugston say about something at some Dconf that it 
> must trigger allocation "not hardly ever, NEVER"? So there's a 
> real need even for the rigid @nogc, albeit a niche one.

Yes, there are a few cases for it, but most people on reddit 
aren't one of them.

It reminds me of the "web scale" thing. "but can this handle 1 
million hits per second?" Probably not, but you also almost 
certainly going to need to... and if you do, the company will 
surely have the budget to hire a whole team of full time people 
to develop some specialized solution to their problem.

The D language should certainly never get in the way of those 
specialized solutions, whether scaling, or low latency 
audio/bidding, or whatever else, but I'm not convinced it needs 
to support them all out of the box either - and the average D 
user (or web developer in general) certainly doesn't have to 
worry.


More information about the Digitalmars-d-announce mailing list