I like the idea of throw expressions a lot, too. One area where it'd
be useful would be in arrow functions - I really don't enjoy the extra
4-5 characters just to throw an unconditional error from an arrow
function.
```js
// Done this a lot:
foo(...args, () => { throw new Error() })
// Much nicer:
foo(...args, () => throw new Error())
```
-----
Isiah Meadows
[email protected]
On Wed, Apr 12, 2017 at 3:11 AM, Нурбек <[email protected]> wrote:
> Yes, throw expressions would be helpful to shorten if statements to
> one-liner ternary operators. I agree with you.
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss