News for hackers. Stuff that matters.
Re:JavaScript: Double Bitwise Not (~~) by benj111 on Wednesday November 29, 2023 @04:35AM (#38457363)
&& is a syntax element whereas ~~ is 2.

Further you're using a side effect of ~ to get rounding. It isn't being used for its intended purpose.

I get your point and to some extent agree with it.

It's more in the class of

While(foo++ = bar++)

You can do it, but you're to some extent abusing constructs.

If it becomes widely used then it's acceptable, but if not it deemed as bad code. Or clever, depending on your world view.

There are no comments on this comment yet.