dcollections 1.0 and 2.0a beta released

BCS none at anon.com
Fri May 21 20:30:25 PDT 2010


Hello superdan,


> dun tell me it dun work. i dun explain shit again. it works coz a
> struct cant be null. but a struct can be a ref if it only haz one
> pointer inside. methinks the builtin hash iz dat way.
> 

> void foo(container!shit poo)
> {
> if(!poo) poo = new container!shit; // fuck dat shit
> poo.addElement(Shit(diarrhea));
> }
> dat sucks bull ballz.

That code is broken, if poo is of a class type, that just new's a container, 
adds an element, and then drops the reference to get GC'ed. To many it do 
anything generally useful, it would need to have another level of indirection.

-- 
... <IXOYE><





More information about the Digitalmars-d-announce mailing list