- From: <bugzilla@jessica.w3.org>
- Date: Thu, 23 Jan 2014 08:08:18 +0000
- To: public-script-coord@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24291 --- Comment #11 from Tab Atkins Jr. <jackalmage@gmail.com> --- (In reply to Boris Zbarsky from comment #10) > That all explains why passing Promise<Response> is a good idea. Why is > passing a Response a good idea? And why would automatically wrapping it in > a Promise be a bad idea? Because that's what you're actually doing! You respond with a Response. That's the semantics you want; we only allow Promise<Response> because some of the APIs naturally return that, and it's more convenient as I explained. Requiring a Promise<Response> means extra boilerplate for the author to cast it into a Promise. Auto-wrapping means consing up a Promise that'll immediately get unwrapped and thrown away, since it'll automatically unwrap (and risking triggering thenable coercion, too). It seems silly. -- You are receiving this mail because: You are on the CC list for the bug.
Received on Thursday, 23 January 2014 08:08:19 UTC