| Wes Biggs 2005-10-20, 5:45 pm |
| I think this is an excellent idea.
I'd be happy to remove the copy semantic on transient instances in order
to eliminate the need for a separate method. My feeling is that
transient instances are likely to be retained as references, and it's
actually less confusing if those references become persistent-new.
Wes
Matthew T. Adams wrote:
>I like the convergence in the api, and I also like the suggestion to return
>the root object(s) from makePersistent, as it increases symmetry.
>
>Could attachCopy and makePersistent become one, just makePersistent? The
>only difference in the proposal as you suggest, Craig, is the handling of
>transient instances. attachCopy copies instances and makes the copies
>persistent-new, whereas makePersistent just makes them persistent-new; all
>other behavior is the same. If we got rid of attachCopy, in favor of
>makePersistent, and changed makePersistent such that it returns the root
>object(s) given, then the behavior is covered, except for attachCopy's copy
>semantic for transient instances. The only difference in the API if we keep
>attachCopy is the copy semantic for transient instances, which I don't think
>is all that important.
>
>Thoughts?
>
>--matthew
>
>
>
>
>
>
>
|