Deterministic Memory Management With Standard Library Progress

Anthony via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 6 09:54:25 PST 2017


On Monday, 6 March 2017 at 17:21:15 UTC, Wyatt wrote:
> On Sunday, 5 March 2017 at 04:36:27 UTC, Anthony wrote:
>>
>> I would pick both, if I had the time to do so. I'm a college 
>> student; with that in mind, I can only really learn one right 
>> now without giving up most of my free time. I think it'd be 
>> stressful if I tried.
>
> This is fair, but, speaking from the field: learning how to 
> JIT-learn and pick up languages quick is a valuable skill that 
> you will never stop using.  It's always worth reminding 
> yourself that languages are cheap; the conceptual underpinnings 
> are what's important.
>
> -Wyatt

I guess I should have said this earlier, but I will not be 
working in the coding industry. Well, it's at least not the plan. 
I'm a math and physics major as well, and hope that something 
works out in those fields.

Personally, I enjoy coding but not maintaining others' code. 
Consequently, I think most coding jobs would leave me unhappy, 
but I plan using coding as a personal hobby/skill/tool. With that 
in mind, C++ knowledge doesn't have some inherent value for me; I 
just want a tool that can do what it can do. Hence, D (almost).

-------------------------

On the main topic, I was peeking around D's blog, and found an 
interview of Walter Bright and Joakim, an interviewer for our D 
blog. One of the questions asked Walter what his response toward 
the "@nogc" crowd, and he says:

>It became clear that the garbage collector wasn't needed to be 
>embedded in most things, that memory allocation could be decided 
>separately from the algorithm. Letting the user decide seemed 
>like a great way forward.

He then shares some information about work for extern C++ 
exceptions and that @nogc support remains a high priority.

So, it sounds like this is a concrete, expectable goal. And, if 
that really is true, I'm okay with that. I don't mind the idea of 
waiting, I just don't want to invest time in a tool to realize 
it's not the tool I was looking for.

Until this is implemented, I have a few questions that might 
assuage my lack of closure:

Would it be possible/practical to use another language's code 
within a  D program, like Rust for example, when deterministic 
memory management is necessary? It feels like this would be 
easier then finagling with D to get a similar outcome.

Does the GC run regardless of if it's used? Someone alluded to 
this earlier, but I just wanted clarity. If I write nogc code, 
will the GC just stand by idly? Or, is there an option to 
completely turn it off?

Future thanks for any help.



More information about the Digitalmars-d mailing list