On Thu, Sep 3, 2020 at 10:19 AM Dik Takken <dik.tak...@gmail.com> wrote:
> On 03-09-2020 09:38, Brent Roose wrote: > > Hi all > > > > I want to point out the use-case when you're using CS tools, static > analysers and IDEs: they report unused variables as errors. There are ways > around those errors, but it's more convenient if there's language support. > I'd say that conceptually it's also more correct: if you're not using a > variable, it shouldn't be there. > > Exactly this. > > The intent of a particular language construct does not only need to be > clear to human readers but also to machines. More explicit intent leads > to stronger static code analysis tools, which helps us catch more bugs > earlier. > > Regards, > Dik Takken > Static analysis tools don't need a language feature to support this. They can recognize the $_ pattern and not emit an unused variable warning for it. I'd suggest submitting a feature request. Nikita