Giter Site home page Giter Site logo

Comments (11)

jspahrsummers avatar jspahrsummers commented on March 29, 2024

This is what the method is documented to do. Are you saying that you would prefer a different interface? If so, what would be the motivation?

from reactivecocoa.

bvanderveen avatar bvanderveen commented on March 29, 2024

Currently, the subscribables passed to whenAll: have to side-effects to capture their values (if any). It would be nice if the value yielded by whenAll: was an ordered tuple of the values of the subscribables from which it was created, rather than a unit value.

from reactivecocoa.

bvanderveen avatar bvanderveen commented on March 29, 2024

Ah yes, missed that documentation. :S

I would prefer the return value be a tuple so I don't have to introduce side-effects (e.g., doNext:) to retrieve those values. I could achieve the same result with combineLatest:reduce: (where the reduceBlock is a simple identity, as in the change I proposed) but it might be nice to have a shorthand for that.

from reactivecocoa.

bvanderveen avatar bvanderveen commented on March 29, 2024

Compare .NET ForkJoin: http://msdn.microsoft.com/en-us/library/ff708019(v=vs.92).aspx

from reactivecocoa.

joshaber avatar joshaber commented on March 29, 2024

-whenAll: in its current form is pretty minimally useful. The name also seems odd to me. Feels more like -whenAny: than -whenAll:. Lol @ Pastjosh. So what if we do this. Deprecate -whenAll:, add -whenAny: which passes the tuple from combineLatest:reduce: through.

from reactivecocoa.

jspahrsummers avatar jspahrsummers commented on March 29, 2024

I'm 👍 on making the changes discussed in this thread. I think it makes the most sense to just add a combineLatest: (with no reduce block) method, though. That gives you API consistency, and has a more transformative (rather than effective) feel.

from reactivecocoa.

joshaber avatar joshaber commented on March 29, 2024

@jspahrsummers I almost suggested that but it felt weird to call it -combineLatest: when it wasn't actually, you know, combining (well, I guess it does into a tuple but whatev).

from reactivecocoa.

jspahrsummers avatar jspahrsummers commented on March 29, 2024

Right, it combines into a tuple. I don't know why that's any less of a combination. :P

from reactivecocoa.

bvanderveen avatar bvanderveen commented on March 29, 2024

👍 for adding -combineLatest: which has the same behavior as -whenAll: except that the tuple of values is returned.

from reactivecocoa.

bvanderveen avatar bvanderveen commented on March 29, 2024

Perhaps +combineLatest:reduce: could be deprecated in favor of composing +combineLatest: with a -select:?

from reactivecocoa.

jspahrsummers avatar jspahrsummers commented on March 29, 2024

Fixed by #44.

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.