Function Fluency with infix
We'll cover the following...
The infix notation
Dots and parenthesis are common in code we write, but on many occasions leaving those out can make the code less noisy and easier to follow. For example, the following is familiar code in Java:
//Java
if(obj instanceof String) {
Imagine Java had insisted that we write if(obj.instanceOf(String)) {
—what a clutter that would have been. Instead, we used a nice syntax if(obj instanceof String) {
—that’s much easier to read, and it uses what is called the infix notation, where an operator is infixed or implanted in the middle of its operands. That syntax is ...