News for hackers. Stuff that matters.
Re:Statements vs. Expressions by dtagames on Thursday July 14, 2022 @08:10AM (#32094877)
Ouch! I like to rely on the ternary operator as a cheat for if/then just as much as the next guy, but that qualifies as abuse, lol!
Re:Statements vs. Expressions by kaoD on Thursday July 14, 2022 @02:20PM (#32099663)
I wouldn't say that's abuse and I missed that many many times in JS/TS, for example on unreachable variants in tagged enums. This usually turns into null with a null check afterwards just to throw the exception, which is more verbose for no reason.