--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, May 05, 2011 at 06:21:00AM +0900, Christopher Dicely wrote:
> On Wed, May 4, 2011 at 1:50 PM, Chad Perrin <code / apotheon.net> wrote:
> > On Thu, May 05, 2011 at 04:17:53AM +0900, Christopher Dicely wrote:
> >>
> >> The #clone based method presented upthread (which wasn't mine, it was
> >> 7stud's) works perfectly for the data and requirements presented. It
> >> doesn't work if, in addition to wanting to lose changes to the passed
> >> hashes, one also wants to lose any changes resulting from manipulation
> >> of the data in the hashes, but that wasn't requested.
> >
> > Are you seriously claiming that the person's statements seemed to you to
> > indicate a desire for the data to change in the original data structure?
>=20
> No, I'm claiming that the original requester's statement didn't
> indicate a need to protect against changes resulting from calling
> mutating methods on the keys or values of the hashes, only protection
> from changes resulting from mutations on the hash.

He didn't specify "only protection from changes resulting from mutations
on the hash."  He said he didn't want his actions to change his data
structure, in a very general way.  Drawing distinctions between the data
itself and the "containers" in which the data resides seems like a case
of inventing complexity in the original request that were not indicated.


>=20
> That could be because changes to things held in the hash were supposed
> to be propagated, or it (perhaps more likely) could be because the code
> in which it was to be used wasn't going to be calling mutating methods
> on the keys or values from the hash in any case.
>=20
> In the former case, a deep copy would be wrong, in the latter case it
> would merely be unnecessary.

=2E . . and in the general "I don't want to permanently change anything"
case, which seems most likely, it would be necessary.

--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

--8t9RHnE3ZwKMSgU+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk3BzUQACgkQ9mn/Pj01uKVyngCgivOLgByC3e7xt8cm9wjEY+tk
/K0AoLt462JUJwHnd74WEnq5VPIfnhjY
=x+xx
-----END PGP SIGNATURE-----

--8t9RHnE3ZwKMSgU+--