Implementing .dup / clone for class hierarchies
    guslay 
    guslay at gmail.com
       
    Sun Dec 16 12:01:45 PST 2007
    
    
  
Bill Baxter Wrote:
> I like the .dup idea in D, but how do you implement it for a class 
> hierarchy?  Are there existing libraries that deal with this problem well?
> 
I came across this thread the other day, that suggest doing bitwise copy of the class for shallow copying. I don't know how safe that is.
http://www.digitalmars.com/d/archives/digitalmars/D/learn/1625.html
Another thread that caught my attention was this one.
http://www.digitalmars.com/d/archives/digitalmars/D/41145.html#N41264
Those threads are a little old. I too would like to know if someone came up with a state of the art solution or an informal naming convention.
    
    
More information about the Digitalmars-d-learn
mailing list