Top "Operators" questions

Haskell infix function application precedence

Let f x y = x * y. We can apply this function in two ways: f 5 6, or, using infix notation, 5 `f` 6. …

function haskell operators operator-precedence infix-notation
Swift3 : how to handle precedencegroup now operator should be declare with a body?

Former Swift 3 code for operator was: infix operator × {associativity left precedence 150} But now, as per Xcode 8 beta 6, this generate the …

swift operators swift3 xcode8-beta6
Why does (0 < 5 < 3) return true?

I was playing around in jsfiddle.net and I'm curious as to why this returns true? if(0 < 5 < 3) { alert("…

javascript compare operators boolean-logic
Difference between operator and function in C++?

I could use some help understanding the following in C++, particularly the difference between an operator and a function: What …

c++ operators user-defined-functions
Difference between >> and >>> in Scala

Is there any difference between >> and >>> operator in Scala? scala> 0x7f >>&…

scala operators bit-shift
Combined Comparison / "Spaceship" Operator (<=>) in Javascript?

Ruby has something called a Combined Comparison or "Spaceship" Operator, it looks like this: <=> It does the following: …

javascript ruby operators comparison-operators spaceship-operator
Why are there no ||= or &&= operators in C#?

We have equivalent assignment operators for all Logical operators, Shift operators, Additive operators and all Multiplicative operators. Why did the …

c# operators language-design assignment-operator compound-assignment
Why "||" is used as string concatenation in PostgreSQL/Redshift

I find this really weird. If we will look at the major programming languages they all use "||" as logical "or" …

postgresql operators amazon-redshift
Java operator precedence guidelines

Misunderstanding Java operator precedence is a source of frequently asked questions and subtle errors. I was intrigued to learn that …

java operators operator-precedence
Reference-type conversion operators: asking for trouble?

When I compile the following code using g++ class A {}; void foo(A&) {} int main() { foo(A()); return 0; } I …

c++ operators reference type-conversion operator-keyword