Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
msdsk31823y@iiii
In the codebase I'm working with it's full of void 0 used instead of undefined. It's functionally the same just way less clear. -
Voxera115853yThat usually the result of using for example googles closure compiler for js.
Its a minimizer that can do some other things to.
And yes its only 3 bytes, but if your going to make the code almost unreadable anyway, saving upwards half of it, why not save every byte you can.
But I would never ever accept it for hand written code, specifically due to readability. -
Voxera115853y@Ranchonyx its a trick way to write undefined using 3 chars less and used in minimizer solutions.
It has no other usage.
Using void 0 instead of undefined is just ridiculous. Sure, you save 3 bytes but I've seen the code you write, you definitely should not care about that.
rant