List of Phobos functions that allocate memory?
Steven Schveighoffer
schveiguy at yahoo.com
Thu Feb 6 17:04:14 PST 2014
On Thu, 06 Feb 2014 14:08:39 -0500, Adam D. Ruppe
<destructionator at gmail.com> wrote:
> On Thursday, 6 February 2014 at 18:52:21 UTC, fra wrote:
>> Hey, wait a second. How do you throw without allocating?
>
> I think exceptions should be ok. You optimize the typical path, and
> exceptions are (by definition) an exceptional path. If they are also
> unacceptable, you could restrict yourself to nothrow functions. (Which
> can still throw Errors... but meh they are even *more* exceptional)
I think if reference counting is added, exceptions would be a prime
candidate for using it. They are basically discarded immediately after
being handled.
-Steve
More information about the Digitalmars-d
mailing list