andrewplummer/Sugar — Issue #101: Feature: Object.extended() non-cloning behavior
Author: inossidabile
Created: 2012-02-02 19:17:13+00:00
State: open

If I have some kind of complex structure and all I want is to use .each/.map/etc on it BUT to save the instance... I just can't do it. There's currently no way to fill an object with Sugar Object magic without cloning.

It's not clear from documentation which is default behavior for Object.extended() and in my opinion cloning is not the best one. However what's done is done and backward compatibility will not allow to change this. However we can enter another way to achieve it.

I'd either like to mention that according to #100 this can not only lead to technical problems like losing the correct instance but it can either be a performance issue.