3 ms·
Sure, but if a minifier/optimizer wants a “truthy” value, they can just use “1”. It’d be a pretty bad minifier if it turned something needing a truthy value int
by colejohnson66 4y ago
Sure, but if a minifier/optimizer wants a “truthy” value, they can just use “1”. It’d be a pretty bad minifier if it turned something needing a truthy value into anything more than that.
Unless one can find some minifier producing said example, it’s a bad argument.
- jffry 4y agoIt's essentially unknowable if anybody has produced code out there that is like this, but the point still stands that it is valid code. If you want to uphold a commitment to backwards compatibility, you simply cannot extend your language in a way that might possibly change the behavior of valid-but-nonsensical code in the wild.