Is anybody using the named boolean operators?

前端 未结 13 2139
南方客
南方客 2020-12-06 10:52

Or are we all sticking to our taught \"&&, ||, !\" way?

Any thoughts in why we should use one or the other?

I\'m just wondering because several answe

相关标签:
13条回答
  • 2020-12-06 11:39

    I personally like operators to look like operators. It's all maths, and unless you start using "add" and "subtract" operators too it starts to look a little inconsistent.

    I think some languages suit the word-style and some suit the symbols if only because it's what people are used to and it works. If it ain't broke, don't fix it.

    There is also the question of precedence, which seems to be one of the reasons for introducing the new operators, but who can be bothered to learn more rules than they need to?

    0 讨论(0)
提交回复
热议问题