Bradley Meck (2014-01-28T01:29:07.000Z)
domenic at domenicdenicola.com (2014-01-30T15:52:15.474Z)
This is more just a comment / thinking out loud about syntax. Not related to a specific use case. The following is just what was starting to bring my thoughts around to that though. I am starting to build things with the constructs in this thread, so building out things in a similar manner to Promise.[race|all] . Even with the built ins, some things would just be interesting to have on hand: I went the same route and made a: mapPromises(Map<?,Promise<?>>)=>{rejections:Map<?,?>,resolutions:Map<?:?>}, while working out some example problems / speccing out a User lobby system. I was trying to also figure out a way to dynamically add / remove Promises while waiting on full resolution. Promises.all is useful, but when working out people joining / removing themselves in a voting system it is a bit tough. Ended up making my own function / plumbing for that: mapDynamicallSpecifiedPromises => {promise:Promise<Map<?:?>>,setMappings(Map<?,Promise<?>>)}. This is probably too much for stdlib though. Being able to dynamically change the mappings makes for a much easier time if you have a constantly changing list of users in a room for example.