Giter Club home page Giter Club logo

Comments (5)

gullerya avatar gullerya commented on August 16, 2024

Hi,

First - thanks for the kudos down there.

Regarding the object referentiality - I see your point, you are right. And indeed it is either to preserve standard objects behavior (should still see what would be the price) or allow some limitation here. I prefer, of course, to go first - let me think about it.

Regarding the revokation - looks also right to me, I'll just verify that i'm not missing something that was intentionally making me do it at earliest point and if none - will fix it.

from object-observer.

gullerya avatar gullerya commented on August 16, 2024

Hi,

I've played around the issues that you've raised here and there, it took me some time, but finally I have something to say about them (hopefully something smart :)).

Let's start from the last one, the remark that if a child object is replacing the parent in the graph.
I've opened another defect with the precise definition of the issue here. Thanks for this one!

Regarding the preservation of referential correctness things are getting complicate. :)
It is indeed quite a work to support it and most concerning part here is that it will certainly affect the performance of the processing of any case, even when object has a single parent, which is a vast majority of cases.
Beside that I've realized, that even if I can practically provide a referential correctness for the use-case you gave - same object appearing N times in the single ancestor's graph, it is almost impossible to provide the same functionality across the graphs. At least impossible without some serious memory concerns and/or touching the original object that is an input for an observation. I'd like to refrain from both of those.

From the other side, I think that in the contexts where object-observer is applicable, having same objects duplicated more than once on the graph is very uncommon.

Bottom line: I'd like to postpone handling such a case and meanwhile only make it explicitly visible that cloning creates object duplication when same reference found more than once on the graph.
I'm currently trying to decide to throw an error when encountering such a case or write some warning to the log.

WDYT of all of this?

from object-observer.

gullerya avatar gullerya commented on August 16, 2024

Closing this issue due to quite a big change required while not yet proven strong requirement from the real-life usage, please re-open if any new considerations arose.

from object-observer.

gullerya avatar gullerya commented on August 16, 2024

I'm reopening this issue for a tracking and will attempt to look onto it again

from object-observer.

gullerya avatar gullerya commented on August 16, 2024

After a 'fresh' look onto the issue i'm again postponing to deal with it - the caveats are managing multiple parent contexts per observable which will definitely have a negative impact on performance and code complexity/maintanability.
Let me wait for a real need for this one, if any (there were no public signs of interest except this thread, purely tech one).

from object-observer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.