solnic / virtus

[DISCONTINUED ] Attributes on Steroids for Plain Old Ruby Objects
MIT License
3.77k stars 229 forks source link

Deep freeze class level options #152

Open dkubb opened 11 years ago

dkubb commented 11 years ago

solnic commented 10 years ago

@dkubb how? :smile:

dkubb commented 10 years ago

It's hard to recall, but I believe the point I was making is that we should deep copy then freeze arguments to #attribute because otherwise it allows the data inside an attribute to be modified via reference.

solnic commented 10 years ago

Oh I see. I thought you were talking about class options. Now it makes all sense.

Yes. I already added freezing of attribute instances and now it's just a matter of using IceNine to deep freeze them.

On Thu, Sep 19, 2013 at 10:05 PM, Dan Kubb notifications@github.com wrote:

It's hard to recall, but I believe the point I was making is that we should deep copy then freeze arguments to #attribute because otherwise it allows the data inside an attribute to be modified via reference.

Reply to this email directly or view it on GitHub: https://github.com/solnic/virtus/issues/152#issuecomment-24769167

solnic commented 10 years ago

I'm gonna move it to 2.0.0 milestone as now options include configured coercer which is mutable (coercible builds coercer objects on demand).

I expect a pretty short road from 1.0.0 to 2.0.0 mostly focused on polishing internals and especially improving coercible interface, once it's immutable we'll be able to deep-freeze attribute instances.