News for hackers. Stuff that matters.
Re:RFC: Adopt a modern JavaScript framework for use with Med... by wues on Thursday March 19, 2020 @05:49AM (#22625962)
"We have problems, let’s introduce some code style guidelines, linting, error reporting and most importantly tests!" "Nah, let's just switch to Typescript, it will solve all those problems. At least partially."
Re:RFC: Adopt a modern JavaScript framework for use with Med... by sbergot on Thursday March 19, 2020 @06:06AM (#22626037)
I mean, look at the number of tests needed to replace a few lines of types. You have to check the behavior of your functions for all kinds of invalid inputs. With typescript you still need tests but less of them. And also you can get rid of a lot of input validation in your production code.
Re:RFC: Adopt a modern JavaScript framework for use with Med... by gherkinnn on Thursday March 19, 2020 @06:00AM (#22626005)
It’s not either/or. Nice strawman you put up here.
Re:RFC: Adopt a modern JavaScript framework for use with Med... by wues on Thursday March 19, 2020 @06:05AM (#22626032)
No I didn’t. The statement was that Typescript solves the listed issues, which is obviously not true. There may be of course discussion whether TS _helps_ to solve such issues but you won’t be able to convince me that TS _solves_ e.g. lack of testing.