### Equality and identity comparison in SARL and checking for null: same as Java ?
-SARL' s developer states that the mapping of the operator from SARL to Java are:
+SARL's developer states that the mapping of the operator from SARL to Java are:
* `a === b` becomes `a == b`
* `a !== b" becomes `a != b`
* `a == b` becomes `a == null ? (b == null) : a.equals(b)`
* `a != b` becomes `!Objects.equals(a,b)`. This is null-safe (part of Google API) and the code of the function is `a == b || (a != null && a.equals(b))`
-It is always better to test valid against null with the `===` or `!==` operators. These operators are not replaced neither `operator_equals` nor `operator_notEquals` within the Java code.
+It is always better to test valid against null with the `===` or `!==` operators.
-I believe this is because SARL comparison operators follow the which means that:
+Because the SARL `==` operator is mapped to the Java `equals()` function, and the `===` and `!==` operators to the Java `==` and `!=` operators, it is better/safer, and a best practice, to use `===` and `!==` when one of the operands is of primitive type, e.g. `null`, number constants, primitive type variables. These operators are not replaced neither `operator_equals` nor `operator_notEquals` within the Java code.
+Ususally, the SARL compiler generates a warning to push you to use `===` in place of `==`. But with `null == value`, an ambiguous call error occurs before the warning is generated.
+I believe SARL mapping this is because SARL comparison operators follow the which means that:
* In Xtend the equals operators (`==`, `!=`) are bound to `Object.equals`.
* Java’s identity equals semantic is mapped to the tripple-equals operators `===` and `!==` in Xtend.
Check xtend doc [here](https://www.eclipse.org/xtend/documentation/203_xtend_expressions.html#operators) for more details and SARL doc [here](http://www.sarl.io/docs/official/reference/general/Operators.html#3-comparison-operators).
-_**Note from SARL developer**_: SARL extends a part of [Xtend dialect](https://www.eclipse.org/xtend/index.html) in order to have benefits of several background features, such as the validation tests for type inheritance. Since Xtend and SARL uses [Xbase](https://www.eclipse.org/Xtext/documentation/305_xbase.html#xbase-expressions), a large part of the syntax is the same, especially within the blocks of code. (The rest of the syntax is defined in parallel. SARL was inspired by languages such as Scala, Python and Ruby. Several bugs or incoherencies of Xtend are fixed in SARL.
+_**Note directly from SARL developer (Sept 2018)**_: SARL extends a part of [Xtend dialect](https://www.eclipse.org/xtend/index.html) in order to have benefits of several background features, such as the validation tests for type inheritance. Since Xtend and SARL uses [Xbase](https://www.eclipse.org/Xtext/documentation/305_xbase.html#xbase-expressions), a large part of the syntax is the same, especially within the blocks of code. (The rest of the syntax is defined in parallel. SARL was inspired by languages such as Scala, Python and Ruby. Several bugs or incoherencies of Xtend are fixed in SARL.
There is still a bit of an issue inside the Xbase library; check this <https://github.com/sarl/sarl/issues/852#issuecomment-420842088>
+I have created an issue regarding null == value: Issue [#854](https://github.com/sarl/sarl/issues/854).
+According to the associated discussion within the Xbase group [#300](https://github.com/eclipse/xtext-extras/issues/300), the error message will be updated to push the developers to use `===`.
### How to return two values? Pairs in SARL