== Quote from Andrei Alexandrescu ([email protected])'s article > On 07/13/2010 04:42 PM, Vladimir Panteleev wrote: [...] > I agree. I think we should, again, define two primitives:
> T* malloc(T, A...)(A args) if (!is(T == class) && !isDynamicArray!T); > T malloc(T, A...)(A args) if (is(T == class) || isDynamicArray!T); > free(T)(ref T obj); > The first two call C's malloc, constructor (if any), and returns the > allocated object. The last calls the destructor (if any) and then free(). > worksforyou? I think malloc should be malloc and free should be free. I'd like almost any other conceivable pair of names better, like make/unmake, create/destroy, build/smash, whatever. Cheers, Pillsy
