Re:A Plea for Lean Software (1995) [pdf]
by Sharlin on Wednesday August 05, 2020 @09:02AM
(#24060317)
What sort of errors wouldn’t have been errors in JS?
[ Parent
| on HN ]
Re:A Plea for Lean Software (1995) [pdf]
by AnIdiotOnTheNet on Wednesday August 05, 2020 @09:44AM
(#24060662)
The ones that are hellishly difficult to diagnose bugs waiting to be discovered I'll bet.
No, just the trivial boilerplate stuff. Forgetting to declare `this` as a parameter, for example.
Re:A Plea for Lean Software (1995) [pdf]
by spanhandler on Wednesday August 05, 2020 @11:17AM
(#24061743)
There are some "cute" uses of truthiness checks that work in JS (and, in some cases, weren't flagged as errors by earlier versions of TS) that are probably a bad idea and are trivial to render more-explicit, so better, but do technically run OK. Example: "if(obj.some_method) {obj.some_method();}". Not an uncommon form in JS in the wild, but TS (correctly) flags it as a problem.
Otherwise I dunno what this could be. Especially what TS could be disallowing that'd be all of: valid in JS, a good idea in JS, and especially time-consuming to fix.