smart_properties icon indicating copy to clipboard operation
smart_properties copied to clipboard

Use the index methods as central mechanism for reading and writing properties

Open t6d opened this issue 8 years ago • 3 comments

In order to attach additional behaviour whenever a property gets read or written, the index methods #[] and #[]= should be used for calling Property#get and Property#set as opposed to using the attribute readers and writers.

This would for instance allow one to implement dirty attribute tracking by overriding []= or track which properties have been initialized vs. which properties fall back to their default.

t6d avatar Apr 05 '17 17:04 t6d

@exterm, does this in essence capture what needs to be done? @SebastianSzturo, any concerns in regard to fundamentally changing the internal flow of information? I expect we can do this without breaking existing specs.

t6d avatar Apr 05 '17 17:04 t6d

Yep, I think this should work!

exterm avatar Apr 05 '17 18:04 exterm

That sounds great! 👍

SebastianSzturo avatar Apr 05 '17 18:04 SebastianSzturo