A Plea for Bit-Twiddlers! (please keep ! as logical negation, separate from bitwise negation!)

Novice users likely don’t encounter such code. And if they would, the current ~1 == -2 isn’t much better. I rather see a hiccup for experienced users, as !1 == -2 goes against all tradition.

This has been discussed here (5238, here (19788) and here (25180) at least. (19788 lists language comparisons for logical operators based on Rosetta). – Those (partly longstanding) issues didn’t lead to action.

And imho the choice is arbitrary. From the comparison it seems, the more obscure a language, the more likely is usage of 'and-or-not' and from the discussion it seems, the more core/senior the (Julia) developer the less enchanted by this proposition.

Your ‘higher-level business logic programmers’ remark gave me the thought, that maybe it is even important to prefer '&&', '||' and '!' to signal that Julia is not some slow wishy-washy hip language but fast, respectable and suited for many tasks besides doing data analysis. :wink: :rocket: – More honestly I think, go, rust, swift, R, Matlab, javascript and of course C have choosen and there is no reason to deviate. (And certainly not in the last minute). I did like the 'and-or-not' style from Pascal, but when having to write '&&' etc. in R, it really was not important.

4 Likes