Linting standards: Bitwise operators
colinbdclark at gmail.com
Mon Apr 7 09:59:36 EDT 2014
If I remember correctly, Crockford’s prohibition on them in JSLint involved trying to remind developers coming from other languages that using these operators in “clever” ways isn’t actually as fast as they might be in C or Java. Here’s what he said in the Good Parts:
+1 for allowing bitwise operators.
On Apr 6, 2014, at 11:20 AM, Antranig Basman <Antranig.Basman at colorado.edu> wrote:
> Checking with the community about a jshint option that came up in the channel on Friday - do we agree that the prohibition against the bitwise operators (which I believe was simply inherited into jshint from the Crockford days) is irrational?
> Their annotation simply reads
> IMO just because they are "rare" doesn't mean that they are not to be recommended - also the XOR operator seems indispensable without which we would write monstrosities such as if (!!a !== !!b).
> Are we ok to just turn off this option in our linting?
More information about the fluid-work