Git Product home page Git Product logo

Comments (7)

jspahrsummers avatar jspahrsummers commented on April 20, 2024

Why not just accept KVO options (which include the option to receive an initial notification)?

from reactivecocoa.

joshaber avatar joshaber commented on April 20, 2024

Maybe, but that'd require a bit more support for propagating the change dictionary. Which might be good to have anyways, but seems separate from this particular issue.

from reactivecocoa.

Coneko avatar Coneko commented on April 20, 2024

I mostly call it from a macro, so it's easy to switch between RACAble and RACAbleWithStart depending on whether I want the initial value or not.

I don't think much of my code would break if this behaviour was changed, and even the parts that did break would be trivial to fix, but I'd still rather have the option to choose whether I want the initial value or not, after all you do get the option with vanilla KVO.

from reactivecocoa.

jspahrsummers avatar jspahrsummers commented on April 20, 2024

@joshaber The change dictionary is mostly orthogonal โ€” just make it clear you can't get new/old no matter what. Initial and prior options are still really useful.

from reactivecocoa.

joshaber avatar joshaber commented on April 20, 2024

Closing this for now. I think the real problem is that it can be hard to know if you need to use RACAbleWithStart instead of RACAble to get the behavior you want. This might just be papering over the issue.

from reactivecocoa.

Coneko avatar Coneko commented on April 20, 2024

@jspahrsummers :

just make it clear you can't get new/old no matter what.

Why is this? -rac_addObserver:forKeyPath:options:queue:block: doesn't look like it would have issues with it.

from reactivecocoa.

jspahrsummers avatar jspahrsummers commented on April 20, 2024

I mean that you wouldn't be able to get KVO "diffs", like added/removed objects in an arrayย (obtained from the KVO change dictionary, as generated by NSKeyValueObservingOptionNew or NSKeyValueObservingOptionOld), because that would mean that the signal is sending different kinds of values at different times.

from reactivecocoa.

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.