On 9/22/13 6:34 PM, Nicholas Londey wrote:
* allocate(s) returns a ubyte[] with length at least s, or null. (It
does not throw on out-of-memory because that would hurt composability;
it turns out many elemental allocators do naturally run out of
memory.) This method is required for all allocators. In most
allocators this method should be @safe.

Would an 'expected' be a possible alternative to returning null?

Am a big fan of this talk of yours.
http://channel9.msdn.com/Shows/Going+Deep/C-and-Beyond-2012-Andrei-Alexandrescu-Systematic-Error-Handling-in-C

Thanks! I think expected would be appropriate for the high-level allocator.

Andrei

Reply via email to