2 ms·
The github issue seems to cover this well: existing linters have code to cover intentionally unused bindings and this is a cleaner way to express that. Do you d
by acdha 9y ago
The github issue seems to cover this well: existing linters have code to cover intentionally unused bindings and this is a cleaner way to express that. Do you disagree with the rationale in that discussion?
- pitaj 9y agoThat's true, but in that case adding optional catch binding is completely useless.
- nikcub 9y agoI'd be more ok with it being paired with exception filtering (or what Netscape called conditional catch clauses), ie. } catch (e if e instanceof CriticalError) { // handle critical } catch (e if e instanceof TypeError) { // handle type mismatch } catch () { } so you could at least handle critical and other errors before blindly silencing - but for some reason exception filtering/conditional catch hasn't come up in ECMA