News for hackers. Stuff that matters.
Re:Complete Rewrite of ESLint by gregors on Monday November 28, 2022 @09:19AM (#33773881)
"much better safety"

Every bug to to ever hit production has

* passed all manual testing

* passed all unit tests

* passed the type checker

Re:Complete Rewrite of ESLint by schwartzworld on Monday November 28, 2022 @09:41AM (#33774135)
> passed all manual testing

Or been ignored. It happens.

> passed all unit tests

If they have been written at all. And every bugfix should come with a regression test.

> passed the type checker

If it hasn't been disabled. And I would expect that a bug that could be fixed with better typing would include making types more restrictive when necessary.

Unfortunately, tools like testing and types are seen in two conflicting ways. Some people embrace them and see that they can use them to write better code with less bugs. Others see them as obstacles that have been placed in their way due to the additional learning curve.

Re:Complete Rewrite of ESLint by __alexs on Monday November 28, 2022 @09:22AM (#33773914)
I have written and shipped many Python bugs that did not pass the type checker but it was impossible to run the type checker because it would not be invented until many years later.
Re:Complete Rewrite of ESLint by gregors on Monday November 28, 2022 @09:36AM (#33774075)
If you had a type checker bug you didn't you manually test that code path at the bare minimum. Type check bugs are the most simplistic bugs to catch. Is it nice sure, but if you can't spot those before you ship I can almost guarantee that you have larger logic bugs that the types won't catch.

What isn't helpful is the the notion that types replace testing. Either manual testing or unit/functional/generative testing. It isn't "safer" at all, it does speed up development by catching the simple bugs so the run edit compile loop is less. If you're saying "my code compiles then it's works", I don't buy it.

Re:Complete Rewrite of ESLint by __alexs on Monday November 28, 2022 @09:58AM (#33774385)
> If you had a type checker bug you didn't you manually test that code path at the bare minimum.

I'm glad that you agree type checkers help avoid error prone and expensive manual testing work.

> What isn't helpful is the the notion that types replace testing.

Types are a type of testing. They are another tool in the toolbox for writing correct programs.

Re:Complete Rewrite of ESLint by Kinrany on Monday November 28, 2022 @09:21AM (#33773911)
This is a fully general argument for debugging in production.
Re:Complete Rewrite of ESLint by pohl on Monday November 28, 2022 @09:20AM (#33773896)
Everyone who has died drank milk.
Re:Complete Rewrite of ESLint by nightski on Monday November 28, 2022 @09:51AM (#33774291)
That's a tautology. If you have manual testing, unit testing, and type checking then of course you are only going to see bugs that pass those.

But what bugs did you not see hit production because these eliminated it?