Tab Atkins Jr. (2015-04-29T16:54:16.000Z)
On Wed, Apr 29, 2015 at 4:39 AM, Elie Rotenberg <elie at rotenberg.io> wrote:
> Using array destructuring assignment and constraining linting rules, I often
> find myself having to chose names for bindings I don't intent on using. I
> usually end up using a conventional ignore name, such as _ignore, which I
> "void" to shut up the linter without adding exceptions. Besides the linting
> problem (which can be solved by refining the linting rules), it's still a
> conceptually useless binding.
>
> Here's a contrived example:
>
> const lastOfThree = ([first, second, third])  => third;
>
> Which I usually end up rewriting:
>
> const lastOfThree = ([_ignore1, _ignore2, third]) => {
>   void _ignore1;
>   void _ignore2;
>   return third;
> }

Honestly, this should probably be answered by fixing the linter, so it
doesn't give linting errors when a variable named "_" is unused.  (In
fact, it should probably do the opposite, and give a lint error when _
*is* used. This'll make users of underscore or lo-dash unhappy,
though. ^_^)

~TJ
d at domenic.me (2015-05-11T16:40:14.537Z)
On Wed, Apr 29, 2015 at 4:39 AM, Elie Rotenberg <elie at rotenberg.io> wrote:

> Using array destructuring assignment and constraining linting rules, I often
> find myself having to chose names for bindings I don't intent on using. I
> usually end up using a conventional ignore name, such as _ignore, which I
> "void" to shut up the linter without adding exceptions. Besides the linting
> problem (which can be solved by refining the linting rules), it's still a
> conceptually useless binding.

Honestly, this should probably be answered by fixing the linter, so it
doesn't give linting errors when a variable named `_` is unused.  (In
fact, it should probably do the opposite, and give a lint error when `_`
*is* used. This'll make users of underscore or lo-dash unhappy,
though. ^_^)
d at domenic.me (2015-05-11T16:40:05.124Z)
On Wed, Apr 29, 2015 at 4:39 AM, Elie Rotenberg <elie at rotenberg.io> wrote:

> Using array destructuring assignment and constraining linting rules, I often
> find myself having to chose names for bindings I don't intent on using. I
> usually end up using a conventional ignore name, such as _ignore, which I
> "void" to shut up the linter without adding exceptions. Besides the linting
> problem (which can be solved by refining the linting rules), it's still a
> conceptually useless binding.

Honestly, this should probably be answered by fixing the linter, so it
doesn't give linting errors when a variable named "_" is unused.  (In
fact, it should probably do the opposite, and give a lint error when _
*is* used. This'll make users of underscore or lo-dash unhappy,
though. ^_^)