Re: Future and getUserMedia

On Thu, Jun 6, 2013 at 4:15 AM, Dominique Hazael-Massieux <dom@w3.org>wrote:

> During the teleconf today on our potential adoption of Future, there was
> a proposal that I thought was interesting: to use the removal of prefix
> as the right time to decide whether we should keep traditional callbacks
> or use Futures instead (in the model where we want to avoid maintaining
> the two models for ever).
>

This is somewhat dangerous. Elsewhere authors have shown a tendency to
write code like "(window.foobar || window.mozFoobar)(...)", i.e. "future
proof" their code by assuming the unprefixed interface is exactly the same
as the prefixed interface. (Yes, this destroys the value of prefixing.
That's why Gecko and Blink are moving away from prefixing.)

I would have thought that we could make the getUserMedia successCallback
optional, and when it's not passed, have getUserMedia return a future
instead of using the callback(s).

Rob
-- 
q“qIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q qwqhqaqtq
qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq qsqiqnqnqeqrqsq
qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq qiqfq qyqoquq
qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq qtqoq qyqoquq,q
qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq
qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"

Received on Wednesday, 5 June 2013 22:24:59 UTC