std.allocator needs your help

Nicholas Londey londey at gmail.com
Sun Sep 22 18:34:00 PDT 2013


> * 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


More information about the Digitalmars-d mailing list