virtus icon indicating copy to clipboard operation
virtus copied to clipboard

Deep freeze class level options

Open dkubb opened this issue 11 years ago • 4 comments

dkubb avatar Feb 23 '13 11:02 dkubb

@dkubb how? :smile:

solnic avatar Sep 19 '13 17:09 solnic

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.

dkubb avatar Sep 19 '13 20:09 dkubb

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 [email protected] 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 avatar Sep 19 '13 20:09 solnic

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.

solnic avatar Sep 26 '13 07:09 solnic