3 ms·
> Hashable mutable objects are a giant liability. Ruby even has freezing of objects, so it should only allow hashing frozen objects at least. Well, of all dang
by xentronium 14y ago
> Hashable mutable objects are a giant liability. Ruby even has freezing of objects, so it should only allow hashing frozen objects at least.
Well, of all dangerous things you can do with ruby, this is one of the least dangerous ones. How about "any gem can monkey patch any other gem or even core classes"? Isn't this a giant liability?
Besides, it's not that difficult to make your custom hash that only allows immutable objects for keys.
- lucian1900 14y agoIndeed it is, but at least that liability is much more obvious and publicised.