Re: Re: Mutable Bytes

Martin Christensen <[email protected]> Tue, 27 Jul 2004 20:27:58 +0200
Newsgroups gmane.comp.lang.prothon.user
Message-ID <[email protected]>
>>>>> "Mark" == Mark Hahn <[email protected]> writes:
>> I'm all for letting strings be 'mutable until hashed' (put that in
>> your bon and smoke it! :-)), and setImmutable() sounds like a good
>> idea. However, as far as dictionary keys are concerned, I think
>> that immutability is required for an object's dictionary key, the
>> function that returns it should call setImmutable() itself. Does
>> this make sense?
Mark> I'm not sure what all you are suggesting, but I don't want
Mark> something as important as the mutability of an object to change
Mark> invisibly as the side effect of some other operation.  Too
Mark> implicit.

Good point. Let me then change my suggestion to letting objects whose
dictionary keys depend on the object value, not the object identity,
throw an exception if they have not been made immutable.

Martin

-- 
Homepage:       http://www.cs.auc.dk/~factotum/
GPG public key: http://www.cs.auc.dk/~factotum/gpgkey.txt
signature.asc (application/pgp-signature, 196 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iEYEABECAAYFAkEGnrAACgkQYu1fMmOQldUPMQCgl86PLxhXGC4xGvaIc1r+CS3z
PlUAoNKPOSY3LQj5zI6jtT1SzaxSOfhl
=6B1k
-----END PGP SIGNATURE-----