I did say it's more obnoxious to use the comma operator. I do not recommend it, I just wanted to offer an alternative for those that might like the syntax better. There are some cases where the comma operator is more useful / easier to use, but I can't say I recommend using it in general as it creates code that's easier to forget about, which might create some unintentional side effects.
I also agree with this, and I don't particularly like that syntax either. Usually it's something you can do for dev real quick and delete it before you commit, though.
41
u/seiyria Mar 19 '19
You could also use the
,operator for this, like so:Although, since you need parens around it, it's a bit more obnoxious.