News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.