[dmd-internals] Throwing Errors

Artur Skawina art.08.09 at gmail.com
Thu Mar 22 13:56:03 PDT 2012


On 03/17/12 17:55, Jacob Carlborg wrote:
> 
> On 17 mar 2012, at 17:48, Andrei Alexandrescu wrote:
> 
>> On 3/17/12 5:37 AM, Leandro Lucarella wrote:
>>> Well, you know that avoiding the GC in D is not particularly easy, as
>>> there are so many hidden allocations...
>>
>> I wonder how we can improve on this. It's becoming quite clear that the GC is a concern of many potential D users.
> 
> 
> To start with: a switch which makes it can error to use any feature the relies on the GC.

A compiler switch wouldn't be enough, even if it was possible. A user may want
to avoid (implicit) GC allocations in only certain code paths. Some kind of attribute
annotation scheme could help (pure-like); otherwise one would have to either duplicate
a lot of code and/or split the RT/non-rt parts of the app into different processes.
IOW, the situation wouldn't change much.

artur


More information about the dmd-internals mailing list