> Honestly I'm shocked at the defense of this practice (of ASI "abusage")
Devil's advocate here: could one argue that taking advantage of ASI everywhere can make it safer, because it forces you to be fully aware of ASI?
Suppose you always put in semicolons. You can STILL get bitten by ASI. The classic example is
return
{
...stuff...
};
ASI is going to put a semicolon right after the return and break your code.
Someone who strives to take advantage of ASI everywhere they can is going to remember that ASI is going to apply on that return, and they will code the above so as to take it into account.
Devil's advocate here: could one argue that taking advantage of ASI everywhere can make it safer, because it forces you to be fully aware of ASI?
Suppose you always put in semicolons. You can STILL get bitten by ASI. The classic example is
ASI is going to put a semicolon right after the return and break your code.Someone who strives to take advantage of ASI everywhere they can is going to remember that ASI is going to apply on that return, and they will code the above so as to take it into account.