Who has examples they like of ways to control Deep Copy operations so that they don't go crazy and copy too much stuff by accident, and it takes you a long time to notice (or maybe you never notice)?
-
-
That's fair.. My answer sometimes for similar issues is to establish a scope that allows to set an expectation (this amount of time, this amount of data) then warns/traces when the expectation gets violated.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I assume you mean without writing the operation yourself. Assuming deep vs shallow cannot be a global rule per every field of pointer type you need to express for each pointer in a compound whether it copies deep or shallow, and also for its pointer members recursively.
-
Not the prettiest way but I have some code where I say I want to generate a copy procedures by passing in a type and an array of bools. I basically describe a tree with implicit leafs (type has no pointer fields) and explicit ones (by passing in a 0 for that field).
-
a copy procedure* I haven't thought about how to represent this tree in a nice way though as it was just a proof of concept. It's a bit silly to pass in a tree so raw but I feel it could be made into something that could be typechecked. Also, somehow I feel I'm missing the point
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.