Vote for std.process

Johannes Pfau nospam at example.com
Fri Apr 12 01:34:12 PDT 2013


Am Fri, 12 Apr 2013 17:04:08 +1000
schrieb Manu <turkeyman at gmail.com>:

> 
> I've said before, I sadly have to avoid phobos like the plague. Some
> modules (like this one) that provide fundamental functionality - not
> just helper functions - can't be avoided. Requirements for those
> should be extra strict in my opinion.
> 

Most (GC) allocations could be fixed without breaking the API. I can
see 2 places where the API forces _GC_ allocations:
* string[string]
* thrown Exceptions are allocated with the GC

There is no simple solution for these. Maybe we'll have a hashtable in
the standard library at some point which will allow to use custom
allocators. Then std.process could use these. Exceptions require some
thinking. You can of course allocate them using any allocator, but
freeing them is difficult...

If you want to get rid of all (not only GC) allocations, there's another
issue: As D strings are not zero terminated we'll always have
allocations passing those to C code. Maybe we should have a cstring
type in phobos which would just be a string which is guaranteed to be
zero terminated.

http://dpaste.dzfl.pl/e76aa995 (needs some inout though)


More information about the Digitalmars-d mailing list