Code Monkey home page Code Monkey logo

Comments (4)

AWinterman avatar AWinterman commented on July 23, 2024

I don't know how I feel about this-- it strikes me as non-idiomatic, and as though objectstate is concerning itself with how it is used, rather than doing its job well. I'd prefer we leave it to clients to copy or not as they see fit. Then they can choose the solution that's correct for them.

We are letting them shoot themselves in the foot, but so is JavaScript.

from objectstate.

jarofghosts avatar jarofghosts commented on July 23, 2024

the ability to set things outside of streaming to them (via .set()) is a very important feature that single-handedly puts the object-handling ball back into OS's court.

OS managing the copying seems to be the only way to prevent leakiness.

from objectstate.

AWinterman avatar AWinterman commented on July 23, 2024

For #12, We also need to copy whenever we check to see if we should emit or not, which means we accrue the performance costs of the copy anyway.

Additionally, if we DONT copy, client modules could mutate state without the objectstate ever hearing about it, which contravenes its purpose of encapsulating global state and emitting whenever it changes.

from objectstate.

jarofghosts avatar jarofghosts commented on July 23, 2024

fixed in 180f07f

from objectstate.

Related Issues (7)

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.