datastax/ruby-driver — pull request #5 by iconara (2014-09-05 06:43:03+00:00)
Title: Reorder the arguments yielded by Future#on_complete

Sorry if this re-opens a long-winded debate, but would you consider changing the order of the arguments yielded by `Future#on_complete` to value first, error second?

Since `#on_complete` isn't currently used anywhere, this should have no impact.

I've worked a bit more on the next version of Ione to make sure that it can remain backwards-compatible, but still interoperable with the futures from this driver. I realized that I the future, value, error variant wouldn't be backwards-compatible without checking the arity of the callbacks, and if I did that I could drop the first argument and yield value and error when the arity is 2.

With this change, and the current master of Ione you can return a `Cassandra::Future` in a `Ione::Future#flat_map` and that way chain asynchronous operations without any glue code.