W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2014

Re: [whatwg] Notifications: making requestPermission() return a promise

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 1 Oct 2014 23:44:32 +0000 (UTC)
To: Domenic Denicola <domenic@domenicdenicola.com>
Message-ID: <alpine.DEB.2.00.1410012342510.12123@ps20323.dreamhostps.com>
Cc: WHATWG <whatwg@whatwg.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Wed, 1 Oct 2014, Domenic Denicola wrote:
> > 
> > This sort of behavior makes promise rejection essentially worthless.
> 
> They are as "worthless" as exceptions.

Some exceptions _are_ "worthless", as witnessed by the fact that nobody 
ever tries to catch them. For example, TypeError.

This is why I've argued before that these worthless exceptions should 
continue to be real exceptions even in the Promise case.

Incidentally, this bug and this comment in particular are quite relevant 
to this thread (regarding how to design an API with promises):

   https://www.w3.org/Bugs/Public/show_bug.cgi?id=25472#c18

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 1 October 2014 23:44:56 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:24 UTC