On 2/7/2014 11:53 AM, Jonathan M Davis wrote:
or to avoid allocating them

Grep for 'throw' in std.datetime shows that every throw is actually:

    throw new ...

and an example:

throw new DateTimeException("SYSTEMTIME cannot hold dates prior to the year 1601.");

There is no requirement that the new is done there. You can preallocate the DateTimeException statically, and simply keep rethrowing the same exception instance.

I.e. the allocation issue is a coding style issue, not a language problem.

Reply via email to