Memory management design

Paulo Pinto pjmlp at progtools.org
Wed Jul 10 09:12:42 PDT 2013


Am 10.07.2013 15:57, schrieb John Colvin:
> On Wednesday, 10 July 2013 at 13:00:53 UTC, Kagamin wrote:
>> On Wednesday, 10 July 2013 at 08:00:55 UTC, Manu wrote:
>>> most functions may actually be @nogc
>>
>> Most functions can't be @nogc because they throw exceptions.
>
> I think I mentioned before, elsewhere, that @nogc could allow
> exceptions. No one who is sensitive to memory usage is going to use
> exceptions for anything other than exceptional circumstances, which
> perhaps don't need the same stringent memory control and high
> performance as the normal code path.
>
>
> How much of the exception model would have to change in order to free
> them from the GC? I don't see high performance as a concern for
> exceptions so even an inefficient situation would be fine.

Who is going to write two versions of the library then?

Throwing exceptions with @nogc pointers floating around would just lead 
to the same headache as in C++.

--
Paulo


More information about the Digitalmars-d mailing list